Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 not generating .pdb files

I was trying to debug a c++ app, but I saw breakpoints show "breakpoint will not be hit", so I checked the modules window and I saw "Binary was not build with debug information" so no symbols are loaded. And the only pdb file on the /debug folder is vc100.pdb, and there are no other pdb files anywhere in the project folders.

In properties C/C++ > Debug Information Format, I have set Program Database (/Zi). And runtime library is set to Multi-threaded Debug (/MTd).

Am I missing any other setting that's causing not to create the pdb files?

like image 259
slemdx Avatar asked May 17 '11 19:05

slemdx


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.

How do I add a PDB file to Visual Studio?

Open Settings: Tools->Options -> Debugging -> Symbols and add directory, where your . PDB files are located. You can add custom path, like for each project, and also you can edit common path, where Visual Studio will save all . pdb cache.

Where does Visual Studio look for PDB files?

pdb file stores all debug information for the project's .exe file, and resides in the \debug subdirectory. The <project>. pdb file contains full debug information, including function prototypes, not just the type information found in VC<x>. pdb.


1 Answers

You also need to have: Properties > Linker > Debugging > Generate Debug Info = "Yes"

like image 76
jwismar Avatar answered Sep 26 '22 23:09

jwismar