views:

51

answers:

2

I've upgraded to Win7 and VS2010. Previously on Win2K and VS2008, I used GlobalFlags to debug an application on startup, simply by setting it's debugger to vsjitdebugger - see the screenshot below. Unfortunately, this doesn't work on my current setup - a google and search of SO haven't turned up any answers.

Thanks in advance.

UPDATE: Forgot to mention that my global flags settings do seem to have some effect - running my command on the command line causes Windows to say the program has crashed - it works just fine without the global flags. This is leading me to think my command line for the debugger is incorrect - but that's just a guess. I'd be interested in hearing from anyone who's got this to work.

alt text

+1  A: 

Running the 64-bit version of Windows 7? Using the 32-bit version of gflags.exe?

You can also edit the registry directly. An example .reg file for notepad.exe:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="vsjitdebugger.exe"
Hans Passant
I am actually using a 64 bit version of Windows but I have tried both versions. I'm actually trying to debug a 32-bit app if that makes any difference. I will try the registry setting in the morning - thanks.
cristobalito
The 32-bit key is in HKLM\Software\Wow6432Node\etc
Hans Passant
yeah - it'll be interesting to see if it works. What gets me is what's the difference between my old setup and the new one - Win7 strikes me as the most obvious culprit.
cristobalito
Of course not, it is running your first 64-bit operating system. There will be other surprises...
Hans Passant
haha - no, I'm a 64-bit "veteran" so I've been bitten at one stage or another by a lot of the surprises :)
cristobalito
A: 

It looks like there's an extra step in Win7 which I wasn't expecting - it throws up a "MyProgram has stopped working" screen first. If you look at the details, it says it's an application crash.

You get the options:

  • "Check online for a solution and close the program"
  • "Close the program"
  • "Debug the program"

Clicking debug then pops up the vsjitdebugger dialog and all is well.

cristobalito