How do I use PDB files

hamishmcn picture hamishmcn · Sep 16, 2008 · Viewed 44.1k times · Source

I have heard using PDB files can help diagnose where a crash occurred.
My basic understanding is that you give Visual studio the source file, the pdb file and the crash information (from Dr Watson?)
Can someone please explain how it all works / what is involved? (Thank you!)

Answer

Omer van Kloeten picture Omer van Kloeten · Sep 16, 2008

PDB files map an assembly's MSIL to the original source lines. This means that if you put the PDB that was compiled with the assembly in the same directory as the assembly, your exception stack traces will have the names and lines of the positions in the original source files. Without the PDB file, you will only see the name of the class and method for each level of the stack trace.