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

C++Visual Studio-2010Pdb Files

C++ Problem Overview


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

C++ Solutions


Solution 1 - C++

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.

Solution 2 - C++

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

It will disable the display of modules loaded.

Solution 3 - C++

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

Solution 4 - C++

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

Solution 5 - C++

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

Solution 6 - C++

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.

Solution 7 - C++

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1723768View Question on Stackoverflow
Solution 1 - C++PaulView Answer on Stackoverflow
Solution 2 - C++Luis SalazarView Answer on Stackoverflow
Solution 3 - C++zarView Answer on Stackoverflow
Solution 4 - C++IngoView Answer on Stackoverflow
Solution 5 - C++EM0View Answer on Stackoverflow
Solution 6 - C++jsl4980View Answer on Stackoverflow
Solution 7 - C++richView Answer on Stackoverflow