Hey, what's a PDB File?
The program database (.pdb) file is used by your integrated development environment (IDE; like Visual Studio) to maintain the state of your project (it remembers your formatting, where you placed everything, and info from the compiler).
The type of file is often called a Source Browser Database (.pdb) file.
PDBs are separate files, needed for debugging to work. They are created automatically in the project's directory or subdirectory, with the same name as the executable, but with the .pdb extension instead. If PDB files are misplaced or aren't properly moved and tracked with your other files, then they must be found for debugging to work properly.
The files hold debugging and project state information. The PDB files enable incremental linking of your program's debugging configuration.
The PDB file is made during the compilation process, even though the final executable isn't even named. You see, the PDB file is often made as a temp file and then merged into the .pdb file later. Some languages, like VC#, require you to use a linker to merge the temporary PDB file into the main one. Of course, it's always recommended to do that, so that you can see the stack trace, source files, line numbers, etc.
Further Reading:
- https://blogs.msdn.microsoft.com/vcblog/2016/02/08/whats-inside-a-pdb-file/
- https://www.wintellect.com/blogs/jrobbins/pdb-files-what-every-developer-must-know
- Example error: https://blogs.msdn.com/b/ms_joc/archive/2005/11/14/492533.aspx
Thanks! Please reply in the comments with questions or suggestions on how to better explain PDB files!
- User Ed
Comments
Anonymous
January 31, 2016
Computers Today (part 1 of 6) blogs.msdn.com/.../computers-today.aspx ..... CS SPOTLIGHT: Girls in computer programming... why it matters!!! blogs.msdn.com/.../cs-spotlight-girls-in-computer-programming-why-it-matters.aspx ... Computational Thinking - Videos & Papers by Jeannette Wing blogs.msdn.com/.../computational-thinking-videos-amp-papers-by-jeannette-wing.aspxAnonymous
February 13, 2016
UPDATE: I added an excellent blog post with lots of depth on this topic: blogs.msdn.microsoft.com/.../whats-inside-a-pdb-file