Display lines number in Stack Trace for .NET assembly in Release mode

后端 未结 7 1404
生来不讨喜
生来不讨喜 2020-11-22 15:07

Is there a way to display the lines in the stack trace for the .NET assembly build/deployed in Release mode?

UPDATE:

My application is divided into t

相关标签:
7条回答
  • 2020-11-22 15:53
    • Go into the Properties window for the project where you want to see stack trace line numbers.
    • Click on the Build "vertical tab".
    • Select "Release" configuration. Check the DEBUG constant parameter.
    • Uncheck the "Optimize code" parameter to avoid the occasional trace issue with inlined code (this step is not essential).
    • Press the Advanced... button and choose Output -> Debug Info -> pdb-only.
    • Deploy the generated .pdb file with the assembly.

    Implemented with the comment below:

    • One other thing to check is in the "Package/Publish Web" section that the "Exclude generated debug symbols" checkbox is also unchecked
    0 讨论(0)
提交回复
热议问题