Why can't Visual Studio 2010 find / open PDB files?

I am trying to use OpenCV in VS 2010. I am an amateur and I am learning the first steps from the OpenCV wiki. However, when trying to debug my project, the following errors occur:

'C: \ Windows \ SysWOW64 \ ntdll.dll', cannot find or open the PDB file 'C: \ Windows \ SysWOW64 \ kernel32.dll', cannot find or open the PDB file 'C: \ Windows \ SysWOW64 \ kernellbase. dll ', cannot find or open PDB file

I have these files in the correct directory, so why don't they open them? What should I do to fix this problem?

+75
visual-c ++ visual-studio visual-studio-2010 opencv
Jan 27 2018-11-11T00:
source share
10 answers

First change the following parameters:

Tools โ†’ Options โ†’ Debugging โ†’ Symbols โ†’ Server โ†’ Yes

Then press Ctrl + F5 and you will see amazing things.

+110
Nov 15 2018-11-11T00:
source share

I am sure that these are warnings, not errors. Your project will still work fine.

However, since you should always try to fix compiler warnings, let's see what we can find. I am not completely familiar with OpenCV, and you are not referencing the wiki tutorial that you are following. But it seems to me that the problem is that you are using a 64-bit version of Windows (as evidenced by the "SysWOW64" folder on the path to the DLL files), but the OpenCV material you created for the 32-bit platform. Therefore, you may need to rebuild the project using CMake, as described here .

In particular, the listed files are Windows system files. PDB files contain debugging information that Visual Studio uses so you can embed and debug compiled code. In fact, you do not need PDB files for system libraries that allow you to debug your own code. But if you want, you can download symbols for system libraries. Go to the "Debug" menu, click "Options and Settings" and scroll down to the right until you see "Enable Source Server Support." Make sure the option is checked. Then in the tree on the left click "Symbols" and make sure that the option "Microsoft Symbol Servers" is selected. Click OK to close the dialog box, and then try restoring.

+20
Jan 27 2018-11-11T00:
source share

Visual Studio Community Edition 2015

Had this error all day. I finally fixed it by going to Tools> Import and Export Settings> Reset All Settings> Reset General Settings.

After Reset, go to Tools> Options> Debug> Symbols> "Then check the box next to Microsoft Symbol servers.

Run the application in debug mode, and it will open windows that say loading symbols for a bunch of different DLL files. Let it end it.

Once it is completed, it should work again.

+6
Apr 02 '16 at 17:33
source share

I had the same problem. It turns out that when compiling the project that I received from someone else, I did not install the correct StartUp project (right-click on the desired startup project in the solution explorer and select "install as StartUp project"). Maybe this will help, welcome.

+3
Feb 21 '13 at 12:51
source share

For VS2013 users who ended up here, like me:

Tools -> Options -> Debugging -> Symbols 

You will see that the Cache symbols in this directory: field is empty; You can either view / enter the path yourself, or simply click the Load all symbols button. A warning window will appear, saying: "Since you did not select a directory with a character cache, it will be used by default." Now you will see C:\Users\XXXX\AppData\Local\Temp\SymbolCache in the previously empty path field. Click Load all symbols second time, and you should be installed. The hit is normal, and just for the sake of diligence, cleanse and rebuild your decision.

+2
Jun 01 '15 at 17:05
source share

Referring to the first thread / other option, VS cannot open or find the pdb file of the process when your executable is running in the background. I worked with mpiexec and ran into this problem. Always check your task manager and kill any exec process that you intend to create in your project. As soon as I did this, it was debugged or built perfectly.

In addition, if you try to continue the warning, breakpoints will not be deleted and it will not have the current executable

+1
Jul 12 2018-12-12T00:
source share

I found that sometimes these errors occur due to the lack of permissions when compiling the project, so I run it as an administrator to make it work correctly.

0
Mar 31 2018-12-12T00:
source share

I have the same warnings. I am not sure if this is a question 32 vs 64 bit. They just downloaded new characters and some problems were resolved, but those related to OpenCV are still persistent. This is an excerpt from the output with a solved vs unresolved problem:

'OpenCV_helloworld.exe': loaded 'C: \ OpenCV2.2 \ bin \ opencv_imgproc220d.dll', cannot find or open a PDB file

'OpenCV_helloworld.exe': loaded 'C: \ WINDOWS \ system32 \ imm32.dll', Symbols loaded (source information deleted).

The code goes 0 if someone asks.

The program '[4424] OpenCV_helloworld.exe: Native' exited with code 0 (0x0).

0
Jun 25 2018-12-12T00:
source share

I had the same problem. Debugging does not work with the material that comes with the OpenCV executable. You must create your own binaries.
Then enable Microsoft Symbol Servers in Debug-> options and settings-> debug-> symbols

0
Dec 25 '12 at 15:58
source share

I ran into the same problem. When I ran my Unit Test code in C ++, I received the error message "I can not find or open the PDB file."

Magazines

When I looked at the output log in Visual Studio, I saw that it was looking for the wrong folder. I renamed the WinUnit folder, but something in WinUnit code was looking for the PDB file using the name of the old folder. I think they hard coded it.

Problem found

When I first downloaded and unpacked WinUnit files, the main folder was called "WinUnit-1.2.0909.1". After I unzipped the file, I renamed the folder to "WinUnit", since it is easier to enter it when setting up the Visual Studio project. But apparently this broke the ability to find the PDB file, even if I configure everything according to the WinUnit documentation.

My fix

I changed the folder name to the original and it works.

Weird

0
May 15 '13 at 5:55
source share



All Articles