Generating debugging information
Published 02 January 2013
Generating a .pdb file allows you to debug the resulting assembly in an IDE.
To generate debugging information, in the Project Settings window, go to Generate Debugging Information or click the icon in the toolbar.
Select I want to generate the debugging information.
The coloured bars under the toolbar icon and to the left of the feature options are always green, whether or not this option is selected.
You can choose to generate debugging information in Windows PDB or Portable PDB format. Portable PDB is a new cross-platform format, best fitted for .NET Core and .NET Standard assemblies. Portable PDB files contain the same information as traditional Windows PDB, however they were redesigned to be used strictly with .NET applications, making their file size much smaller.
You can obfuscate the file paths to your source code which are recorded in the .pdb file by selecting I want to obfuscate the documents' URLs in the .pdb file.
Note: You cannot use this option if you need to debug the assembly in an IDE (because the IDE will not be able to locate your source code).
More about debugging and the .pdb file
- If you rely on the error reporting feature to debug your application, you do not need to generate the .pdb file.
- If you still want to use the stack trace to debug your assembly, it is recommended that you generate the .pdb file.
- If you obfuscate the documents' URLs (source file names and paths), no critical information is stored in the .pdb file. This allows you to distribute the .pdb file with your application, which adds the source line number in the stack trace.
- If you want to be able to use breakpoints in a debugger to debug your assembly, it is recommended that you do not obfuscate the documents' URLs.
SmartAssembly also lets you generate a new .pdb file for the protected assembly.