Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 "Cannot find or open the PDB file"

I try to debug a program in Visual Studio 10, but I have a problem with breakpoints. I put *.pdb files corresponding to the *.dll files to the same directory. But while checking modules, I see that each DLL file is signed as Cannot find or open the PDB file.

How can I fix this problem? How can I check where *.pdb files are expected to be located?

like image 788
Yakov Avatar asked Dec 07 '11 09:12

Yakov


People also ask

How do you fix Cannot find or open the PDB file?

Try go to Tools->Options->Debugging->Symbols and select checkbox "Microsoft Symbol Servers", Visual Studio will download PDBs automatically. PDB is a debug information file used by Visual Studio. These are system DLLs, which you don't have debug symbols for.

What is PDB path?

PDB Path in CodeView Debug Information In both cases, the name of the PDB file with the . pdb extension is included to ensure the debugger locates the correct PDB for the program. A partially qualified PDB path would list only the PDB file name, such as: Test.pdb.

What does PDB file do?

pdb file holds debugging and project state information that allows incremental linking of a Debug configuration of your app. The Visual Studio debugger uses . pdb files to determine two key pieces of information while debugging: The source file name and line number to display in the Visual Studio IDE.

How do I use PDB debugging?

The easiest way to use the PDB file is to let Visual Studio do the heavy lifting - either launch your program with Visual Studio's "Debug" command (F5 by default), or run the program and use the "Attach to Process" item in Visual Studio's Debug menu.


2 Answers

The modules (Ctrl-D, M) is a good place to sort out whats going on so you're in the right area.

Right-click the module/dll you expected the pdb to be found for and select Symbol Load Information

It should look in the same directory as your dll to begin with and if it finds the pdb will either load it or tell you that the pdb file doesnt match the dll.

like image 193
wal Avatar answered Oct 19 '22 17:10

wal


Go to Debug -> Options and Settings -> Debugging -> Symbols, check Microsoft Symbol Servers under Symbol Locations. See attached photo.

Include Symbols

like image 12
john ktejik Avatar answered Oct 19 '22 19:10

john ktejik