windows – 应用程序验证程序自动进程转储文件创建

我知道如何手动使用AppVerif以及windbg来调试进程的问题,但是我正在组建一个自动化系统来运行一系列压力测试而不需要用户.

我需要一种方法来在AppVerif发现问题时生成进程转储,并继续(假设它是非致命错误).

有没有办法将AppVerif配置为正确生成进程的转储而不是中断,或者我必须附加windbg并以某种方式自动化它以在中断命中时创建转储,然后继续.

最佳答案 不,这不是appverif.exe的内置功能.不是真正的问题,你可以使用另一个程序来生成minidump.像
SysInternals’ ProcDump utility.

运行appverif.exe以配置您的测试应用程序.您想要更改ExceptionOnStop属性(底部窗口).将其设置为TRUE,以便在测试失败时抛出异常.

然后使用procdump运行测试,告诉它使用-e参数在未处理的异常上生成转储.例如:

  c:\bin\procdump -e -x . broken.exe

当我在broken.exe上尝试它时看起来像这样,它故意破坏一个句柄:

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

Process:               broken.exe (5892)
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:           .\
Dump filename/mask:    PROCESSNAME_YYMMDD_HHMMSS


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

[11:23:30] Exception: C0000008.INVALID_HANDLE
[11:23:30] Exception: C0000421
[11:23:30] Unhandled: C0000421
[11:23:30] Dump 1 initiated: .\broken.exe_150713_112330.dmp
[11:23:30] Dump 1 complete: 1 MB written in 0.0 seconds
[11:23:31] Dump count reached.

您可能希望更改转储文件的写入位置并添加一些自动化,以便在生成转储时发出通知.

点赞