Associating WinDbg with .DMP files and other tips.

During a discussion here about debugging in Windows we got onto the topic of extensions and tricks to speed things up and cut out extra steps.

One super simple tip is to associate the .DMP memory dump files with WinDbg, this was previously posted by another Escalation Engineer who herself got it from someone else. Suffices to say that it’s definitely worth passing along and can save a lot of time when going through many dumps:

First create a .reg file with the following contents (as always be very careful when modifying the registry):

Windows Registry Editor Version 5.00





@=”Debug this Dump”

@=”\”C:\\debuggers\\windbg\” -z \”%1\” -c \”$<c:\\debuggers\\commands.txt\””

@=”Debug this Dump with Remote:70″

@=”\”C:\\debuggers\\windbg\” -server tcp:port=70 -z \”%1\” -c \”$<c:\\debuggers\\commands.txt\””

This will give you two additional options on the context menu when rightclicking on .dmp files. First “Debug this Dump” which will open WinDbg with your dump and then run the commands in commands.txt. The second option “Debug this Dump With Remote:70” will do the same thing but also set up a remote so that your coworkers can remote in to your debugging session though port 70. (Remember to change the paths so they point to the directories where you have windbg.exe and commands.txt)

Secondly, create a file called commands.txt that contains any commands you want to run when the debugger starts. The one below sets the symbol path to the public symbols and loads sos.dll.

.sympath srv*c:\symbols*
.load clr10\sos

Here are some additional resources to help get you started in your debugging adventures. It should be noted that whether you’re an OEM working on a case with our team or you’re an average beta tester. Providing memory dumps and the most basic analysis initially will definitely help get the ball rolling, any support professional or tester will greatly appreciate the extra effort.

WinDbg Tutorial:
Microsoft Advanced Windows Debugging and Troubleshooting
The Old New Thing
Windbg by Volker von Einem
Joel on Software
Debugging Toolbox
Advanced .NET Debugging

Comments (0)