如何配置 Windows 以从应用程序生成核心转储?
如何配置 Windows 以从应用程序生成核心转储?
我使用的是 Win xp,该应用程序是使用 Visual Studio 2003 构建的。
How can I configure windows to generate a core dump from an application?
I'm using Win xp, and the application is build with Visual Studio 2003.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
Microsoft 有一个名为 Userdump.exe 的免费工具可以执行此操作。
使用该工具为因异常关闭的进程创建转储 (.dmp) 文件或为挂起的进程创建转储文件非常简单
Microsoft has a free tool called Userdump.exe which will do this.
It's pretty simple to use that tool to create a dump (.dmp) file for a process that shuts down with an exception or to create a dump file for a hanging process
只是提出一些其他建议:
Just to throw in some other suggestions:
您可以打开任务管理器(通过右键单击任务栏),在进程选项卡中找到您的进程,右键单击它并选择创建转储文件。
You can open Task Manager (by right clicking the task bar), find your process in the processes tab, right-click it and select Create Dump File.
您可以按照此处所述尝试使用 WinDbg。
You might try using WinDbg as described here.
您可以使用 adplus 为正在运行的应用程序生成故障转储。该命令可能如下所示:
您还可以使用 Windbg 附加到进程并运行以下命令:
You can use adplus to produce a crash dump for a running application. The command may look something like this:
You can also attach to a process with windbg and run this command:
我建议您参阅以下有关该主题的 MS 知识库文章。您通常会使用 Windows 调试工具之一(例如 WinDbg)来调试转储文件。网络上有很多文章描述如何执行此操作。
I refer you to the follows MS KB article on the subject. You would typically debug the dump file using one of the Windows debugging tools, e.g. WinDbg. There are many articles on the web describing how to do this.
我知道 AP 是关于 Win XP 的,但这已经过时了,所以我发布了高于 Windows Server 2008 和带有 Service Pack 1 的 Windows Vista 的答案。
使用 WER (Windows 错误报告)在应用程序崩溃时生成转储文件。它也可以在用户的计算机上使用。
只需添加一个注册表项:
我将其设置为
%LOCALAPPDATA%\CrashDumps
。或者,您可以通过定义子项或限制要保留的转储文件的数量来过滤到您自己的应用程序。请参阅上面的链接了解所有可能性。
I know the AP was about Win XP but that is highly outdated so I'm posting an answer anything above Windows Server 2008 and Windows Vista with Service Pack 1.
Use WER (Windows Error Reporting) to generate a dump file when your application is crashing. It is available also on the user's computer.
Only one registry key need to be added:
I set that to
%LOCALAPPDATA%\CrashDumps
.Optionally, you can filter to your own application by defining a subkey or limiting the number of dump files to keep. See the link above for all the possibilities.