我刚开始使用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.
如您所见,他报告了一个未处理的异常,但未创建转储文件。
我在这里做错了什么?
-e -g
无法捕获 StackOverflowException 异常:[19:58:58] Exception: C00000FD.STACK_OVERFLOW [19:58:58] 进程已退出。 [19:58:58] 转储计数未达到。
- Kirill Osenkov