What is the purpose of pdb files?
Asked Answered
B

4

9

I Am using a third party library in one of my .NET projects.

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

Breccia answered 27/8, 2010 at 9:15 Comment(0)
S
6

They hold the debugging symbol information.

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

Selsyn answered 27/8, 2010 at 9:17 Comment(0)
D
2

A dll is binary so you can't have your code line inside. For instance ,the pdb helps your debugger to show you your code line when you have an exception when you're executing your binaries.

Decretory answered 27/8, 2010 at 9:25 Comment(0)
Z
2

You can remove them on deployment server. They are useless except for debugging purpose.

Zaffer answered 27/8, 2010 at 9:43 Comment(0)
N
2

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

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

If you don't have PDB files it will look like this -

at Program.Main(String[] args)

The difference being the PDB file gives you the location in your source code where the exception happened.

Naughty answered 23/8, 2017 at 20:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.