Using GlobalFlags to call vsjitdebugger with VS2010

假如想象 提交于 2019-12-13 03:24:51

问题


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 http://img825.imageshack.us/img825/3538/55489547.png


回答1:


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"



回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/3399787/using-globalflags-to-call-vsjitdebugger-with-vs2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!