Cannot find or open the PDB file in Visual Studio C++ 2010
Asked Answered
L

7

121

I use Visual Studio 2010 C++ and my project builds without errors but when I run it I get this. I am on Windows XP.

'Shaders.exe': Loaded 'C:\Documents and Settings\User\My Documents\Visual Studio        2010\Projects\Shaders\Win32\Debug\Shaders.exe', Symbols loaded.
'Shaders.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB  file
'Shaders.exe': Loaded 'C:\qt-everywhere-opensource-src-4.8.3\bin\QtCored4.dll', Symbols  loaded.
'Shaders.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\msvcp100d.dll', Symbols loaded.
'Shaders.exe': Loaded 'C:\WINDOWS\system32\msvcr100d.dll', Symbols loaded.
'Shaders.exe': Loaded 'C:\qt-everywhere-opensource-src-4.8.3\bin\QtGuid4.dll', Symbols loaded.
'Shaders.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\WINDOWS\system32\winspool.drv', Cannot find or open the PDB file
'Shaders.exe': Loaded 'C:\qt-everywhere-opensource-src-4.8.3\bin\QtOpenGLd4.dll', Symbols loaded.

Thanks

Lumbago answered 18/10, 2012 at 12:35 Comment(3)
Not sure that this will solve your problem or not, but my problem solved my Cannot find or open the PDB file problem on Virtual C++ 2010 Express. Go to Tools > Options > Debugging > Native and check Load DLL ExportsSherasherar
Please note that the location of this option has changed as of Visual Studio 2015, it is now under Tools > Options > Debugging > General > Load dll exports (Native only)Ator
See Also: Error Message : Cannot find or open the PDB fileBlackandblue
S
254

PDB is a debug information file used by Visual Studio. These are system DLLs, which you don't have debug symbols for. Go to Tools->Options->Debugging->Symbols and select checkbox "Microsoft Symbol Servers", Visual Studio will download PDBs automatically. Or you may just ignore these warnings if you don't need to see correct call stack in these modules.

Semifinalist answered 18/10, 2012 at 12:39 Comment(8)
I have the same problem I was trying to install opencv to VS12. It seemed loading the symbols but when I rebuild there is no change. Do you have another idea why this is happenning?Mannerism
It worked for me but only partially. It cannot load symbols for the dlls related to openCV. Same as @MannerismProstatectomy
@Prostatectomy You need to specify paths to OpenCV symbols in that dialog. Microsoft Symbol Servers only have symbols for Microsoft DLLs.Semifinalist
Thanks @Paul. I don't have OpenCV related PDB files and it seems to get them I'll have to reinstall OpenCV using cmake https://mcmap.net/q/131347/-how-amp-where-to-add-debugging-symbols-for-visual-c-opencv-project . Don't want to reinstall OpenCV though....Prostatectomy
The \Users\%Username%\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols is the typical location where the downloaded MS symbols are stored. During the 50 MB D/L for my project, VS10 in "hourglass" mode was never relegated by Task Manager to a "not responding state", however.Degree
@Frankenstein Are you seeing messages about Windows DLLs or about DLLs of your project?Semifinalist
it's about DLL of windows in SysWOW64 anyway i have used the solution below from @Luis Salazar and it disapearedGlowing
With this I had to downgrade MSTest.TestAdapter.1.2.0 to 1.1.18 and MSTest.TestFramework.1.2.0 to 1.1.18 then it workedSherilyn
W
52

Working with VS 2013.
Try the following Tools -> Options -> Debugging -> Output Window -> Module Load Messages -> Off

It will disable the display of modules loaded.

Wiese answered 28/2, 2014 at 3:48 Comment(5)
This is the better solution as It removes these lines instead of just fixing PDB unloaded files information. Upvoted.Tortuosity
Trying to do this the visual studio environment changed its visual environment :(Vespertilionine
Note that this is not the solution, it just avoids the problem.Goldston
@CaryBondoc depends what you view the problem as being... if the problem is that lots of irrelevant noise in the output can make it easy to miss actual information, then this method is better, as the other method just changes the quality of the noise by replacing Cannot find or open the PDB file with Symbols loaded. It would be nice if the output were color coded or something. Of course there's also the risk of doing this and forgetting about it when it later becomes important. Such is the life of a programmer.Afterlife
How to avoid getting this window? When I press F11 on framework method I get this annoying window. I have to be careful when to press F11 or press F10. please helpDistraint
G
35

Answer by Paul is right, I am just putting the visual to easily get there.

Go to Tools->Options->Debugging->Symbols

Set the checkbox marked in red and it will download the pdb files from microsoft. When you set the checkbox, it will also set a default path for the pdb files in the edit box under, you don't need to change that.

enter image description here

Gorblimey answered 31/5, 2017 at 19:31 Comment(0)
H
4

If you have more as one Project in your Project Map use THE SAME hard coded PathFile PDB Name in all your Sub-Projects:

Use e.g.

D:\Visual Studio Projects\my_app\MyFile.pdb

Dont use e.g.

$(IntDir)\MyFile.pdb

in all the Sub-Projects !!!

= Compiler Param /Fd

Himmler answered 20/2, 2015 at 19:45 Comment(1)
what is "Project Map"?Simplex
D
0

This can also happen if you don't have Modify permissions on the symbol cache directory configured in Tools, Options, Debugging, Symbols.

Dalury answered 15/8, 2016 at 9:5 Comment(0)
M
0

I ran into a similar problem where Visual Studio (2017) said it could not find my project's PDB file. I could see the PDB file did exist in the correct path. I had to Clean and Rebuild the project, then Visual Studio recognized the PDB file and debugging worked.

Miserable answered 6/5, 2019 at 19:26 Comment(0)
T
-2

you just add the path of .pdb to work directory of VS!

Tension answered 17/1, 2017 at 14:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.