What is the purpose of pdb files?

I use a third-party library in one of my .NET projects.

I notice that there is a ton of pdb files in the bin folder - one for each DLL. What is the purpose of the pdb file?

+7
pdb-files
source share
4 answers

They contain information about debugging information.

http://en.wikipedia.org/wiki/Program_database

+6
source share

The dll is binary, so you cannot have your line of code inside. For example, pdb helps your debugger show you its line of code when you have an exception when you execute your binaries.

+2
source share

You can delete them on the deployment server. They are useless, except for the purpose of debugging.

+2
source share

If your .NET program throws an exception and is built with a PDB file, the stack trace for this exception message will look like this:

at Program.Main(String[] args) in C:\dev\program.cs:line 262 

If you do not have PDB files, it will look like this:

 at Program.Main(String[] args) 

The difference is that the PDB file gives you the location in the source code where the exception occurred.

0
source share

All Articles