tags:

views:

887

answers:

3

Currently, when I right-click on .DMP (or .MDMP) files, the "Open With" popup has Visual Studio 2005 and 2008 on it. How can I add WinDbg to this list, without removing either of the Visual Studio options?

I've used the "Choose a program" option, and this adds WinDbg to the list. Unfortunately, WinDbg needs some command-line options to open .DMP files, and I can't find this entry in the registry, so I've got nothing to edit.

+4  A: 

On Windows XP, select 'Choose a program...' and navigate to the .exe. Once you've done that, it'll appear in the list in future.

The same may be true for Vista (I don't have it in front of me).

On my system, WinDbg.exe is located in C:\Program Files\Debugging Tools for Windows


EDIT From this page on MSDN:

-IA[S]

Associates WinDbg with the file extensions .dmp, .mdmp, and .wew in the registry. After this action is attempted, a success or failure message is displayed. If S is included, this procedure is done silently if it is successful; only failure messages are displayed. After this association is made, double-clicking a file with one of these extensions will start WinDbg.

The -IA parameter must not be used with any other parameters. This command will not actually start WinDbg, although a WinDbg window may appear for a moment.

So run WinDbg -IA from the command line to associate .dmp files with WinDbg.


EDIT 2

This site shows you a nice .reg file to add a new "Debug this dump" entry to your context menu. This way you will definitely still have the original 'Open with Visual Studio' option(s) as well.

Drew Noakes
Doesn't work -- you need to add some arguments to WinDbg.exe to get it to load .DMP files from the command line. How to do that?
Roger Lipscombe
Does WinDbg -IA leave Visual Studio on the list? I've not been able to find a definitive answer, and I'd like the option to use WinDbg or VS2008.
Roger Lipscombe
+2  A: 

Try adding (or modifying) the registry entry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dmp\OpenWithList

It would need to have the 'windbg.exe. program specified in a value with a single letter name, and with that letter listed in an MRUList value also under that key (look at other similar keys in regedit to get an idea).

I haven't tried adding a command line option to the program (so I'm not sure how well that'll work, or if it can use some sort of replaceable parameter). If you can't get it to accept a command ine option that you need, writing a simple wrapper program that calls CreateProcess() (or similar) should do the trick.

Michael Burr
A: