Home > Article > Backend Development > Why Can\'t I Access PDB Files During Runtime in Visual Studio 2010 C ?
Unable to Access PDB Files During Runtime in Visual Studio 2010 C
This error arises when attempting to execute a compiled C project in Visual Studio 2010, despite encountering no issues during the build process. Upon execution, the following message appears:
'Shaders.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file '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
Explanation
PDB (program database) files are crucial for debugging purposes, containing information about the symbols and source code used in the compiled executable. However, for system DLLs like kernel32.dll, user32.dll, and gdi32.dll, PDB files are typically not included or accessible.
Solution
Go to Tools > Options > Debugging > Symbols. Select the checkbox "Microsoft Symbol Servers" to allow Visual Studio to automatically download PDB files from Microsoft's servers. After enabling this option, rebuild the project to include the missing PDB files.
If you do not need to view the call stack within the system DLLs, you can ignore these warnings by modifying the debug settings. Under Tools > Options > Debugging > General, uncheck "Enable Just My Code (Unmanaged only)". This will include all modules in the call stack, including the system DLLs.
The above is the detailed content of Why Can\'t I Access PDB Files During Runtime in Visual Studio 2010 C ?. For more information, please follow other related articles on the PHP Chinese website!