Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is stacktrace information available in .NET release mode build?

If I choose release mode to build a dll, is the stacktrace information still available?

If so, then what information is unavailable in release mode?

like image 812
Ricky Avatar asked Jun 29 '10 04:06

Ricky


1 Answers

You always have stack trace information--that's a runtime feature unrelated to the build mode--but line numbers and source file names are normally unavailable in release build stack traces.

You can get both line numbers and source file names in release build stack traces (including in exceptions) by altering the build configuration to create full program database (.pdb) files. To do so in Visual Studio:

  1. open your project's property pages
  2. select the Release configuration
  3. go to the Build tab, then click the Advanced button
  4. select "full" in the Debug Info dropdown.

Note that this will only help if the .pdb files are deployed alongside your application.

like image 86
Ben M Avatar answered Sep 28 '22 07:09

Ben M