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:



Thanks! Please reply in the comments with questions or suggestions on how to better explain PDB files!

- User Ed

Comments (2)

  1. Computers Today (part 1 of 6)



    CS SPOTLIGHT: Girls in computer programming… why it matters!!!


    Computational Thinking – Videos & Papers by Jeannette Wing


  2. UPDATE: I added an excellent blog post with lots of depth on this topic: blogs.msdn.microsoft.com/…/whats-inside-a-pdb-file

Skip to main content