Wednesday, July 23, 2014 Register   Login
Debugging SnapIns in 64bit OS

Justin (who didn’t leave a last name) left a comment on how to debug MMC 3.0 snapins in Windows 7 x64 and Visual Studio 2008. I want to put this on its own blog post, so that I can find it easier. I’ll just repost Justin’s comment here:

I recently struck this problem with VS2008 on Windows 7 x64 as well.
I eventually found a solution :)

The solution is to directly use the 32 bit version of mmc at this path:
C:\Windows\SysWOW64\mmc.exe rather than the one in System32.
you still need the -32 flag as in your screenshot.

When you try and debug via “C:\Windows\System32\mmc.exe -32″ what actually happens is the debugger attaches to the 64bit version which starts the 32bit version(in SysWOW64) and then closes itself hence why it stops debugging immediately.

You can start the snapin that you are debugging on the command line. This is extremely convinient. Here’s a screenshot with Justin’s findings:

This is on the project’s properties page, on the “Debug” tab.

Terms Of Use | Privacy Statement | SystemWidgets
Copyright 2002-2014 by SystemWidgets
Google Analytics Alternative