.NET生产调试 [英] .NET Production Debugging

查看:124
本文介绍了.NET生产调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在生产了一段时间一个Windows应用程序,现在,把它设置给我们发送错误报告时,它抛出异常。其中大部分是相当描述,帮助我很快找到问题(我用的是MS应用程序异常块)。

I've had a Windows app in production for a while now, and have it set up to send us error reports when it throws exceptions. Most of these are fairly descriptive and help me find the problem very quickly (I use the MS Application Exception Block).

有几次我有报道说是我无法重现的问题,并且似乎只发生在少数客户机。

On a few occasions I have reports that are issues that I can't reproduce, and seem to only happen on a few client machines.

我没有这些客户机进行物理访问,都有些什么策略,我可以使用调试?会是更好地建设一些追查到code,或者是有一些其他的选择吗?

I don't have physical access to these client machines, what are some strategies I can use for debugging? Would it be better to build some tracing into the code, or are there some other alternatives?

感谢你。

编辑:我应该更明确:该错误报告,我得到确实有堆栈跟踪,但因为它是生产code,它并不表示导致异常的确切路线,只是在方法它被抛出。

I should have been more clear: The error reports that I get do have the stack trace, but since it's production code, it doesn't indicate the exact line that caused the exception, just the method in which it was thrown.

推荐答案

一种选择是生成(迷你)转储文件作为接近的地方抛出异常尽可能的地步。该<一href="http://blogs.microsoft.co.il/blogs/sasha/archive/2008/05/28/programmatically-generating-a-dump-file.aspx"相对=nofollow>文章有关如何从管理code为此举行了会谈。

One option is to generate a (mini-)dump file as close to the point where the exception is thrown as possible. This article talks about how to do this from managed code.

您便可以装载转储文件到Visual Studio或WinDbg中并用的 SOS

You could then load the dump file into Visual Studio or WinDbg and examine it with the aid of SOS

这篇关于.NET生产调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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