.net - procdump 不会转储未处理的异常

标签 .net unhandled-exception procdump


我刚刚开始使用 procdump,并且希望在发生第二次意外异常时完整转储应用程序。
根据文档,我运行它是这样的:

procdump.exe -ma -e -x C:\CrashDumps C:\Code\CrashApp\CrashApp\bin\Debug\CrashApp.exe

CrashApp.exe 是一个简单的控制台应用程序,启动时会引发异常。
这是我得到的输出:

ProcDump v7.0 - Writes process dump files
Copyright (C) 2009-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
With contributions from Andrew Richards

Process:               CrashApp.exe (6516)
CPU threshold:         n/a
Performance counter:   n/a
Commit threshold:      n/a
Threshold seconds:     10
Hung window check:     Disabled
Log debug strings:     Disabled
Exception monitor:     Unhandled
Exception filter:      *
Terminate monitor:     Disabled
Cloning type:          Disabled
Concurrent limit:      n/a
Avoid outage:          n/a
Number of dumps:       1
Dump folder:           C:\CrashDumps\
Dump filename/mask:    PROCESSNAME_YYMMDD_HHMMSS


Press Ctrl-C to end monitoring without terminating the process.

CLR Version: v4.0.30319

[23:54:51] Exception: E0434F4D.System.Exception ("Hello World")

Unhandled Exception: System.Exception: Hello World
   at CrashApp.Program.Crash(String message) in c:\Code\CrashApp\CrashApp\Program.cs:line 18
   at CrashApp.Program.Main(String[] args) in c:\Code\CrashApp\CrashApp\Program.cs:line 13
[23:54:52] The process has exited.
[23:54:52] Dump count not reached.

正如您所看到的,他报告了一个未处理的异常,但没有创建转储。
我在这里做错了什么?

最佳答案

由于存在 .net 标记,我怀疑您正在监视托管进程。如果是这样,则添加 -g 命令行选项,procdump 将按您的预期工作。

关于.net - procdump 不会转储未处理的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25149147/

相关文章:

.net - 验证客户端证书的最佳方法

.net - web api 2文件上传错误

c# - 如何将子节点添加到派生自 System.Web.UI.Control 的自定义 asp.net 用户控件

android - Flutter 检索 ro.product.cpu.abi 的设备属性时出错

c# - 运行 ProcDump 时出错

c# - HttpWebRequest.GetResponse() 返回错误 500 Internal Server Error

powershell - BizTalk Configuration.exe 远程执行错误

c# - 字符串未被识别为 Windows Server 2016 上的有效日期时间

service - 使用 ProcDump 获取服务的转储?