百度空间 | 百度首页 
 
查看文章
 
Image File Execution Options
2007-02-08 21:14

Enter debugger when application starts

Recently I am debugging a out-of-process COM exe. It crashed some time before I can attach debugger to it. How can I debug the exe when it starts? After check the MSDN, I find that some change to the registry can make it.

 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskLaunchingDebuggerAutomatically.asp    

You can set up your application to start Visual Studio when you launch the application from Windows. Visual Studio will load your application, ready for debugging, but will not commence debugging until you issue an execution command. Having Visual Studio launch the debugger in this way is useful for debugging services and COM out-of-proc servers.

To setup an application to launch the debugger automatically 

  1. Start the Registry Editor (regedit).    
  2. In the Registry Editor, open the HKEY_LOCAL_MACHINE folder.    
  3. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options.    
  4. Under the Image File Execution Options folder, locate the name of the application you want to debug (myapp.exe, for example). If you cannot find the application you want to debug:    
    1. Right-click the Image File Execution Options folder and choose New Key from the shortcut menu.    
    2. Right-click the new key and choose Rename from the shortcut menu.    
    3. Edit the key name to the name of your application, for example, myapp.exe.    
  5. Right-click the myapp.exe folder and choose New String Value from the shortcut menu.    
  6. Right-click the new string value and choose Rename from the shortcut menu.    
  7. Change the name to debugger.    
  8. Right-click the new string value and choose Modify from the shortcut menu.    

    The Edit String dialog box appears. 

  9. In the Value data box, type devenv /debugexe.    
  10. Click OK.    
  11. From the Registry menu, choose Exit.    

    The directory containing devenv.exe must be in your system path. 

    Now, use any method to start your application. Visual Studio .NET will start and load the application. 

关键字:Worm.Pabug.co        Image File Execution Options
附言:仅以此文纪念我焦头烂额的1个小时......


类别:电脑网络 | 添加到搜藏 | 浏览() | 评论 (6)
 
最近读者:
 
网友评论:
1
2007-02-09 19:04 | 回复
支持贵站""同样也期望贵站支持"影视卡通站"!谢谢↓ ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ 影视卡通站[http://hi.baidu.com/kzhan] ~2007.2.2日恢复更新数据通告~~~~欢迎大家光临~谢谢! 本站主要更新项目包括"卡通动漫.欧美电影.日韩电影.卡通真人版,连续剧等" 适合到处寻找影片~卡通的朋友,有了本站,难道还要处处寻找吗?影视卡通站就是你们最理想的选择! 专心打造卡通~电影资源站.........你们的支持[http://hi.baidu.com/kzhan]
 
2
2007-02-10 09:31 | 回复
头大,. 英文不是 很好
 
3
2007-02-13 14:17 | 回复
阳光大哥给您拜年啦!在过去的岁月里,蓝盾天空得到了您关注、关心和关爱,希望在新的一年里继续得到您的支持!衷心祝愿您新年大吉,身体康健,万事顺意,鸿图大发!   .★ * . ★.* .*★  *. *.. ★  ★蓝盾天空http://www.12333.qun.cn ★     祝您新年快乐! ★’ ‘*.        *   ‘★    ★      ‘*..★'
 
4
2007-03-09 22:18 | 回复
过来踩踩
 
5
2007-03-11 14:34 | 回复
我又回来了,圈里又多了好多新人呢,博客做的不错噢,加我为好友吧,这样我下次来就不用验证码了! 百度第一博 宣
 
6
2007-03-16 21:04 | 回复
来告诉你哦, 我的背景音乐是,YUI的TOMORROW"S WAY....看,我这么乖...有没有奖励呢? 呵呵~~
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu