Embedded PDBs - KirillOsenkov/Bliki GitHub Wiki
C# compiler has an option to embed symbols (aka debugging information, aka PDB) directly inside managed assemblies. Specify <DebugType>embedded</DebugType>
MSBuild property in the .csproj to enable this.
The symbols are then stored inside managed metadata tables, and are highly compressed and efficient. The typical size increase from embedding PDBs is less than 15%.
Benefits:
- much faster debugging (no need to locate or download symbols, they are instantly available)
- exception stack traces at runtime contain file names and line numbers, which is useful for debugging and diagnostics
- no need to deploy or publish PDB files with your app
- no runtime performance penalty (no need to locate or load separate PDB files)
- no need to index or upload PDB files to a symbol server
- no need to upload PDB files to services such as Azure Watson
- smaller bin and obj directories, less operations during the build, slightly faster builds