Debugging a program that crashed on another PC

Debugging crashes is always a hassle. It helps if you can see where the crash happened, and I found it non-trivial until I managed to get all the details. So here’s the short of it, and hopefully it will help someone else one of these days (or me when I forget). Note that it’s assumed that the program was compiled with debugging information.

  • Assuming the program is a 32-bit one, open Task Manager from C:\Windows\SysWOW64\TaskMgr.exe.
  • Select the process, right click and choose ‘Create Dump File’.
  • When the message appears, select the path to the dump file, copy it and past into Windows Explorer.
  • Copy the dump file onto a system with Visual Studio.
  • What you also need is the executable which crashed as well as a pdb file for it, and source code which largely matches that.
  • Open the project in Visual Studio.
  • Drag the dump file into Visual Studio.
  • Click ‘Debug with Native Only’.
  • You will now be able to go over the threads and call stacks.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s