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 collect 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.
- Create a key named after the process (like aaa.exe) under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
- Add a string value Debugger with the value ADPlus -crash -mss YourSymbolCacheFolderPath -MiniOnSecond -quiet -o YourDumpFolderPath -sc
来源:https://stackoverflow.com/questions/4123021/how-to-create-process-mini-dump-on-crash-without-running-adplus-explicitly-on-wi