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

3
  • 2
    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 Exports
    – Ari
    May 21, 2014 at 13:01
  • 7
    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) Jul 3, 2015 at 3:27
  • See Also: Error Message : Cannot find or open the PDB file
    – KyleMit
    May 31, 2020 at 18:21

7 Answers 7

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.

8
  • 1
    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?
    – Ege
    Oct 18, 2013 at 13:24
  • It worked for me but only partially. It cannot load symbols for the dlls related to openCV. Same as @Ege
    – Ruchir
    Sep 2, 2015 at 9:54
  • 1
    @Ruchir You need to specify paths to OpenCV symbols in that dialog. Microsoft Symbol Servers only have symbols for Microsoft DLLs.
    – Paul
    Sep 2, 2015 at 18:58
  • Thanks @Paul. I don't have OpenCV related PDB files and it seems to get them I'll have to reinstall OpenCV using cmake stackoverflow.com/a/19436870/5022962 . Don't want to reinstall OpenCV though....
    – Ruchir
    Sep 3, 2015 at 7:10
  • 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. Oct 19, 2015 at 3:23
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.

5
  • 7
    This is the better solution as It removes these lines instead of just fixing PDB unloaded files information. Upvoted.
    – user1180790
    Aug 3, 2014 at 2:37
  • 1
    Trying to do this the visual studio environment changed its visual environment :( Jul 10, 2015 at 19:46
  • 9
    Note that this is not the solution, it just avoids the problem. Aug 25, 2015 at 2:08
  • 3
    @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.
    – PeterT
    Jun 14, 2016 at 12:35
  • 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 help Feb 17, 2018 at 14:50
36

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

0
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

1
  • what is "Project Map"? Sep 12, 2016 at 9:36
0

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

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.

-2

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.