如何在没有在 Windows 7 上显式运行 AdPlus 的情况下在崩溃时创建进程迷你转储?

How to create process mini dump on crash without running AdPlus explicitly on Windows 7?(如何在没有在 Windows 7 上显式运行 AdPlus 的情况下在崩溃时创建进程迷你转储?)

本文介绍了如何在没有在 Windows 7 上显式运行 AdPlus 的情况下在崩溃时创建进程迷你转储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 .NET 进程,有时会在某些 3rd 方库的本机代码中出现 AccessViolationException 失败.

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

当这种情况发生时,我希望有完整的内存迷你转储.我已阅读此页面 - http://support.microsoft.com/kb/931673,部分收集用户模式转储"并按照文章说明配置注册表.但是,当崩溃发生时,会创建一个非常小的报告 - 看不到 *.mdmp 文件.

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.

现在,我知道如何在 ADPLus 中运行该进程,或者如何使其附加到已经运行的进程.但它需要显式运行 ADPLus.

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.

我想知道如何配置 Windows 以自动运行 ADPlus,每次我启动有问题的进程时,无论它是如何启动的 - 从 msbuild、双击、从控制台脚本等...

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...

意思是,当运行 aaaa.exe 时,会被运行带有某些标志的 ADPlus 替换,这些标志会生成带有相应命令行选项的 aaaa.exe.

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

我知道windows中有图像执行标志,可以做到这一点,但我不知道细节.

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

谢谢.

EDIT1

保留命令行参数很重要,因此如果 aaa.exe 使用标志运行,那么从调试器运行 aaa.exe 时当然也应该如此.

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.

推荐答案

没关系,找到了.

  1. HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options 下创建一个以进程命名的密钥(如aaa.exe)
  2. 添加一个字符串值 Debugger,其值为 ADPlus -crash -mss YourSymbolCacheFolderPath -MiniOnSecond -quiet -o YourDumpFolderPath -sc
  1. Create a key named after the process (like aaa.exe) under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Options
  2. Add a string value Debugger with the value ADPlus -crash -mss YourSymbolCacheFolderPath -MiniOnSecond -quiet -o YourDumpFolderPath -sc

这篇关于如何在没有在 Windows 7 上显式运行 AdPlus 的情况下在崩溃时创建进程迷你转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何在没有在 Windows 7 上显式运行 AdPlus 的情况下在崩溃时创建进程迷你转储?

基础教程推荐