Configure an application build to include PDB files in Visual Studio

  • Updated

Objective

In very rare cases, if there are issues with your application when running with the .NET Agent, it may be necessary to build your application with PDB files to allow deeper levels of detail when troubleshooting. 

A .NET Framework application's compiled code is generally contained in DLL files, while debug information is contained in PDB files. These PDB files contain symbol information that Contrast can use to tie stack trace frames to specific lines of code.

By default, the Debug build of web applications includes PDB files; the Release build doesn't. However, most deployments of web applications use the Release build because deploying the Debug build can introduce some unnecessary risks. It's possible to include PDB files in the Release build of a web application by changing a project setting.

 

Note! The inclusion of .PDB files in a web application's deployment is safe and doesn't include the risks associated with publishing a Debug build.

Process

To configure the build/package process for the Release configuration to include PDB files in Visual Studio:

  1. Open the web application's solution in Visual Studio.

  2. Right click on the application's project and select Properties.

  3. Select the Package/Publish Web tab.

  4. Select the Release configuration from the Configuration dropdown.

  5. Confirm that the box to Exclude generated debug symbols is not checked.

  6. Save the project file.

  7. Build and publish the web application using your normal deployment process.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request