What's the PDB files inside the .NET dll files and what it does? Usually peoples remove this file in deploying and only keep the dll file in lib folders but it seems nothing happened and everything works well...
-
1See [Managing Symbols and Source Code](http://msdn.microsoft.com/en-us/library/ms241613) for discussion of Program Database files. – Damien_The_Unbeliever Jun 26 '12 at 06:57
5 Answers
A Program Data Base file has nothing to do with incremental linking and Project State! PDB files are used to map EXE with SOURCES. They are used for Debug and Release binaries. Here an article that explains this binding link between an Executable Image and its PDB file

- 6,084
- 2
- 23
- 35
-
This article (http://www.codeproject.com/Articles/37883/Symbols-File-Locator) also address this issue – mox Jun 28 '12 at 12:23
-
So if I have a config file on my middle-tier with bindings, endpoints, security, etc...then it references pdb? – J.S. Orris Dec 13 '17 at 18:58
PDB files store the information that allows you to debug an application.
The reason that the files are usually not deployed is that there is usually no need to ship them. Should you want to debug the application, you can always load them from a directory, network share or symbol server.

- 2,821
- 16
- 29
-
+1 vote. Thanks for your answer but I can't mark all answers as correct. – Afshin Mehrabani Jun 26 '12 at 13:41
In .NET, it mostly just keeps symbol info for local variables (and scope info too IIRC).

- 115,091
- 17
- 196
- 297
A program database (PDB) file holds debugging and project state information that allows incremental linking of a Debug configuration of your program. A PDB file is created when you compile a C/C++ program with /ZI or /Zi or a Visual Basic/C#/JScript .NET program with /debug. Each time it creates an OBJ file, the C/C++ compiler merges debug information into VCx0.PBD. The inserted information includes type information but does not include symbol information such as function definitions. So, even if every source file includes common header files such as , the typedefs from those headers are stored only once, rather than being in every OBJ file.
-
2This is not correct! PDB have nothing to do with project state information and incremental linking. PDB do contain symbols such as definitions. See more details below from mox. – mox Jun 28 '12 at 13:58
-
2Looks like a copy+paste of https://msdn.microsoft.com/en-us/library/yd4f8bd1(vs.71).aspx – michaelmsm89 Oct 29 '15 at 13:36