添加行号的堆栈部署在释放模式ASP.NET网站的痕迹 [英] Add line numbers to stack trace of ASP.NET web site that is deployed in release mode

查看:117
本文介绍了添加行号的堆栈部署在释放模式ASP.NET网站的痕迹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作对维护一个Web应用程序,本网站有错误日志的功能,以及的。

I working on maintenance of one web application, this web site having error log functionality as well.

我的客户偶尔会遇到网站上的一些问题,它也记录错误日志文件,但它仅显示调用层次结构中的异常出现在堆栈跟踪方法。

My client occasionally face some issue on website which also logged in error log file but it shows only method calling hierarchy where exception occurred in stack trace.

当我明确提高对异常的我的开发环境的堆栈跟踪异常显示方法调用的层次结构和其从已经发生的实际异常的行号。

When I explicitly raise exception on my Dev environment stack trace of exception shows method calling hierarchy and its line number from where actual exception has occurred.

我知道在生产中,这就是为什么我们没有在日志文件中得到错误的行号,我们只部署的DLL。

I know in production we are deploying only DLLs that's why we are not getting error line number in log file.

任何人有任何想法我如何能得到错误的行号,以及在异常时,我们部署DLL(组件)只?

Anybody has any Idea how can I get error line number as well in exception when we deployed DLL (assemblies) only?

推荐答案

在构建设置,设置项目生成调试符号:在释放模式(PDB S)了。如果它们产生,他们将被自动列入部署。没有必要运行在调试模式下的整个网站,你只需要调试符号可用。

In the build settings, set your project to generate debug symbols (pdb:s) in release mode too. If they are generated they will be automatically included on deploy. There is no need to run the entire site in debug mode, you just need the debug symbols available.

该设置是在项目的属性。选择在发布时您正在使用的生成配置。然后生成选项卡上,按高级... 按钮,并设置调试信息为全。

The setting is in the properties of the project. Select the build configuration you are using when publishing. Then on the Build tab, push the Advanced... button and set debug info to "Full".

这篇关于添加行号的堆栈部署在释放模式ASP.NET网站的痕迹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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