如何捕获运行.NET程序到磁盘?磁盘、程序、NET

由网友(孤痞)分享简介:我想执行运行.NET过程中,实际上并没有崩溃,供以后调试的崩溃转储。我怎样才能做到这一点?I'd like to perform a crash dump of a running .Net process, that hasn't actually crashed, for later debugging. Ho...

我想执行运行.NET过程中,实际上并没有崩溃,供以后调试的崩溃转储。我怎样才能做到这一点?

I'd like to perform a crash dump of a running .Net process, that hasn't actually crashed, for later debugging. How can I do this?

这是一个.NET 4的应用程序在Windows 2K3运行。

It's a .Net 4 app running in Windows 2k3.

推荐答案

更新:在这一点上,我会建议使用procdump,而不是因为它支持很多的时候捕捉到转储的其他选项。

Update: At this point I would recommend using procdump instead because it supports a lot of additional options for when to capture the dump.

有关崩溃转储你最好的选择可能是ADPlus的距离 Windows调试工具。它可自动安装的CDB调试和创建转储文件(S)当未处理的异常(S)发生。你甚至可以指示它创建转储所有的第一次机会异常,如果你需要为好。语法是直线前进,所以采取的方法调用 APP.EXE ,你会做这样的事情

For a crash dump your best option is probably adplus from Debugging Tools for Windows. It automates attaching the cdb debugger and creating dump file(s) when an unhandled exception(s) occurs. You can even instruct it to create dumps for all first chance exceptions as well if you need to. The syntax is straight forward, so to take a crash dump of a process call app.exe you would do something like

adplus -crash -pn app.exe -o <output dir>

一旦你的转储,您可以加载到WinDbg中,加载SOS看看,只是使用!线程!printexception 命令。

如果你有兴趣也有一对夫妇的第9频道视频与调试演示。其中演示的是一个崩溃转储。

If you're interested there are a couple of videos on Channel 9 with debugging demos. One of the demos is a crash dump.

http://channel9.msdn.com/文章/ MDCC-TechTalk - 高级-NET-调试部分-1

http://channel9.msdn.com/文章/ MDCC-TechTalk - 高级-NET-调试部分-2

(全面披露:我是presenter的影片,所以请原谅无耻的插头)。

(Full disclosure: I'm the presenter in the videos, so pardon the shameless plug).

阅读全文

相关推荐

最新文章