在释放模式显示行数堆栈跟踪的.NET程序集 [英] Display lines number in Stack Trace for .NET assembly in Release mode

查看:134
本文介绍了在释放模式显示行数堆栈跟踪的.NET程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来显示堆栈跟踪的线,为.NET程序集编译/部署在发行模式?

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

更新:

我的应用程序分为三个类库项目和一个ASP.NET网站项目。我想跟踪误差在三个类库项目之一。我只部署PDB文件的类库项目正在生成对象未设置为一个对象的实例错误。

My application is divided into three class library projects and one ASP.NET "website" project. The error I am trying to track down is in one of the three class library projects. I only deployed the pdb file for the class library project that is generating the "Object reference not set to an instance of an object" error.

行号仍然没有出现在堆栈跟踪。我是否需要部署pdb文件的所有项目,以获得行号的堆栈跟踪?

The line numbers are still not showing up in the stack trace. Do I need to deploy the pdb files for all projects to get the line numbers in the stack trace?

工作液

部署PDB文件固定的行号问题,每个应用程序。

Deploying the pdb file for each application fixed the line number issue.

推荐答案

  • 走进因为你所希望看到的堆栈跟踪行号的项目属性窗口。
  • 点击上生成的垂直标签。
  • 选择发布配置。 <击>检查调试恒定参数。
  • 取消选中优化code的参数,以避免偶尔的跟踪问题,内嵌code(这一步不是必须的)。
  • preSS高级...按钮,然后选择输出 - >调试信息 - > PDB-只。
  • 部署生成.pdb文件与程序集。

  • 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.
  • 这篇关于在释放模式显示行数堆栈跟踪的.NET程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆