How to get line number(s) in the StackTrace of an exception thrown in .NET to show up

后端 未结 6 1612
醉梦人生
醉梦人生 2020-12-04 21:57

MSDN says this about the StackTrace property of the Exception class:

The StackTrace property holds a stack trace, which yo

6条回答
  •  眼角桃花
    2020-12-04 22:26

    If you have a web application or web service project using VS2012 or later, changing the build settings will not work. Instead, you should follow the advice in this article:

    Visual Studio 2012 Website Publish Not Copying .pdb files

    Specifically, you should include the following setting in the

    \Properties\PublishProfiles\*.pubxml
    

    file(s) for your project:

    
      False
    
    

提交回复
热议问题