procdump不倾销未处理的异常

NKn*_*rer 10 .net unhandled-exception procdump


我刚刚开始玩procdump并且我希望在发生无意义的第二次机会异常时完全转储应用程序.
根据我运行的文档,它喜欢这样:

procdump.exe -ma -e -x C:\CrashDumps C:\Code\CrashApp\CrashApp\bin\Debug\CrashApp.exe
Run Code Online (Sandbox Code Playgroud)

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.
Run Code Online (Sandbox Code Playgroud)

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

小智 15

由于.net标签存在,我怀疑您正在监控托管进程.如果是这样,那么添加-g命令行选项和procdump将按预期工作.

  • 答对了!这是我的问题的正确答案(类似于上面).只需要告诉Procdump在托管进程中作为本机调试器运行. (2认同)

ugl*_*ger 6

尝试使用参数e 1 -f -g

-e 1将告诉 procdump 在第一次机会(即处理的)异常以及未处理的异常时捕获转储文件,并且该-f参数将允许您过滤您关心的异常类型。

例如

procdump -ma -e 1 -f C00000FD.STACK_OVERFLOW -g -w CrashApp.exe