在Visual Studio中分析Crash dumps [英] Analyzing Crash dumps in Visual Studio

查看:1163
本文介绍了在Visual Studio中分析Crash dumps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 *。dmp (dump)文件我的崩溃的应用程序。现在,我想分析一个不同的机器上崩溃的进程。也就是说,应用程序崩溃在一台机器上,我在其他机器上有Visual Studio。

I have a *.dmp (dump) file of my crashed application. Now, I want to analyze the crashed process on a different machine. That is, the app crashed on one machine, and I have Visual Studio on other machine.

现在,我需要能够看到堆栈跟踪和所有符号的我的应用程序?是 *。exe 文件和 *。dmp 文件是否足够?

Now, what do I need to be able to see stack trace and all symbols of my app? Is *.exe file and the *.dmp file sufficient?

还是我还需要源代码和PDB文件?

Or do I need also the source code and PDB file?

如果是这样,应该将源代码和可执行文件放在相同的目录结构中

If so, should the source code and executable file be placed in the same directories structure as it is on the machine the process was running?

如何在Visual Studio中将PDB文件附加到崩溃转储文件?

How to attach PDB file to crash dump file in Visual Studio?

推荐答案

不,你肯定需要.pdb文件来获得体面的堆栈跟踪。到目前为止,最简单的方法是从您构建程序的机器上执行此操作,源代码和.pdb文件将在正确的位置。

No, you definitely need the .pdb files to get decent stack traces. By far the simplest way is to do this from the machine on which you built the program, the source code and .pdb files will be in the right place.

下一个最好的事情是将完全相同的可执行文件复制到在故障计算机上安装的完全相同的文件夹中。将.pdb文件复制到同一目录,这是调试器下一步如果它不能在原始构建位置中找到它们。一旦调试器到达带有源代码的语句并且.pdb没有被剥离,那么它将提示你给出源代码文件位置。

Next best thing is to copy the exact same executables into the exact same folder in which it was installed on the failing machine. Copy the .pdb files into that same directory, that's where the debugger looks next if it can't find them in the original build location. Once the debugger lands on a statement with source code and the .pdb wasn't stripped then it will prompt you to give the source code file location.

下一个最好的事情是

在同一对话框中,还打开Microsoft符号服务器(http ://msdl.microsoft.com/download/symbols)。这将获得Windows DLL的符号,并且如果Windows DLL中出现崩溃,您可以准确地跟踪自己的代码。

In that same dialog, also turn on the Microsoft Symbol Server (http://msdl.microsoft.com/download/symbols). That gets you the symbols for the Windows DLLs and lets you accurately trace back to your own code if the crash occurred in a Windows DLL.

这篇关于在Visual Studio中分析Crash dumps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆