在visual studio 2010中调试exe [英] Debug exe in visual studio 2010
问题描述
有没有办法通过shift +双击运行exe来调试外部exe使用visual studio 2010。通常,要以特殊模式运行应用程序,我们按下shift并双击exe,但是我有一个在启动时发生的错误,我想我需要添加一个命令行参数来使其进入该模式。我希望这是有道理的。
Is there a way to debug external exe using visual studio 2010 by shift+double click to run the exe. Normally, to run the application in a special mode we have press the shift and double click the exe, but I have a bug that happens right on start up and I guess I need to add a command line argument to get it into that mode. I hope this makes sense.
推荐答案
所以基本上你希望在进程开始时附加调试器。这应该有帮助。来源 http://blogs.msdn.com/b/ greggm / archive / 2005/02/21 / 377663.aspx
So basically you want to attach debugger as soon as the process starts. This should help. Source http://blogs.msdn.com/b/greggm/archive/2005/02/21/377663.aspx
- 运行regedit.exe
- 转到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT \CurrentVersion\Image文件执行选项 - 为您的exe创建一个新密钥(示例: foo.exe)
- 在您的exe下创建一个新的字符串值。字符串
值的名称为Debugger,值为vsjitdebugger.exe
- Run regedit.exe
- Goto HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
- Create a new key for your exe (example: foo.exe)
- Create a new string value under your exe. The name of the string value is 'Debugger', and the value is 'vsjitdebugger.exe'
这篇关于在visual studio 2010中调试exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!