您的位置:首页 > 其它

Lauch Debugger automatically when start the process

2011-01-30 10:00 363 查看
通常我们在debug的时候一般都是启动程序后在visual studio里点击Attach Process。但是有些时候我们需要在程序启动的时候就开始debug,所以这个时候我们需要做一些设置,让visual studio从一开始就attach到我们的程序上。

To setup an application to launch the debugger automatically

打开注册表.

打开 HKEY_LOCAL_MACHINE .

找到 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options.

在注册表键 Image File Execution Options 下,找到你的进程的名字
(比如myapp.exe). 如果下面没有,就自己创建一个:

右击 Image File Execution Options,选择New Key .

右击新创建的key,选择 Rename .

编辑成你的进程名字,比如
myapp.exe
.

右击myapp.exe, 选择 New String Value .

重命名为debugger.

将该key value设置为
devenv /debugexe

http://msdn.microsoft.com/en-us/library/a329t4ed%28VS.71%29.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐