开发者

How to create process mini dump on crash without running AdPlus explicitly on Windows 7?

开发者 https://www.devze.com 2023-01-24 03:55 出处:网络
I have a .NET process that sometimes fails with AccessViolationException in the native code of some 3rd party library.

I have a .NET process that sometimes fails with AccessViolationException in the native code of some 3rd party library.

I wish to have full memory mini dump when that happens. I have read this page - http://support.microsoft.com/kb/931673, the section "To col开发者_开发技巧lect user-mode dumps" and configured the registry as the article explains. However, when the crash occurrs, a really small report is created - no *.mdmp file is in sight.

Now, I know how to run the process from within ADPLus or how to make it attach to an already running process. But it requires running ADPLus explicitly.

I was wondering how can I configure windows to run ADPlus automatically, each time I start the problematic process no matter how it is started - from msbuild, double clicked, from console script, etc...

Meaning, when running aaaa.exe is replaced by running ADPlus with certain flags which spawns aaaa.exe with the respective command line options.

I know there are image execution flags in windows, which do that, but I do not know the details.

Thanks.

EDIT1

It is important to preserve the command line parameters, so if aaa.exe is run with a flag, then, of course, the same should be true when running aaa.exe from the debugger.


Never mind, found it.

  1. Create a key named after the process (like aaa.exe) under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
  2. Add a string value Debugger with the value ADPlus -crash -mss YourSymbolCacheFolderPath -MiniOnSecond -quiet -o YourDumpFolderPath -sc
0

精彩评论

暂无评论...
验证码 换一张
取 消