开发者

Using GlobalFlags to call vsjitdebugger with VS2010

开发者 https://www.devze.com 2023-01-10 14:53 出处:网络
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.

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 gu开发者_运维知识库ess. I'd be interested in hearing from anyone who's got this to work.

alt text http://img825.imageshack.us/img825/3538/55489547.png


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"


Run the VS2010 on Win7 with administrator privilege, "vsjitdebugger.exe" works fine.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消