Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Analyzing Crash dumps in 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.

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?

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?

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

like image 828
Marc Andreson Avatar asked Sep 03 '12 18:09

Marc Andreson


People also ask

Which tool could be used to Analyse crash dump?

You can analyze crash dump files by using WinDbg and other Windows debuggers. This content is for developers. If you are a customer who has received a blue screen error code while using your computer, see Troubleshoot blue screen errors.


1 Answers

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.

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.

Next best thing is Tools + Options, Debugging, Symbols and add the path to the directory that contains the .pdb files.

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.

like image 184
Hans Passant Avatar answered Sep 20 '22 17:09

Hans Passant