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.

    Note   If the application is managed, Visual Studio launches with the Debugger Type set to Auto. Before you debug, change the Debugger Type from Auto to Mixed in the Property Pages dialog box. For more information, see Specifying Debugger Settings.

See Also

Using the Debugger

Launching the Debugger Automatically的更多相关文章

  1. How to: Launch the Debugger Automatically

    Sometimes, you may need to debug the startup code for an application that is launched by another pro ...

  2. jdb

    http://herongyang.com/jtool/jdb.html http://www.rhcedan.com/2010/06/22/killing-a-java-thread/ 用处:上去杀 ...

  3. 报错:Can't find a source file at "xxxxx“Locate the file or edit the source lookup path to include its location.

    调试问题: Can't find a source file at "/tmp/TI_MKLIB6sLCzz/SRC/exit.c" Locate the file or edit ...

  4. appium(4)-Automating mobile web apps

    Automating mobile web apps If you’re interested in automating your web app in Mobile Safari on iOS o ...

  5. 【旧文章搬运】Windbg+Vmware驱动调试入门(四)---VirtualKD内核调试加速工具

    原文发表于百度空间,2009-01-09========================================================================== 今天又想起 ...

  6. VS 远程调试之 “The visual studio remote debugger does not support this edition of windows”

    The error message "The visual studio remote debugger does not support this edition of windows&q ...

  7. 使用Windows Debugger调试托管代码----引用自官方帮助文档

    以下文字引用在Windbg的帮助文档.觉得对初次调试托管代码,非常有用,故粘贴至此. ========================================================= ...

  8. IntelliJ运行下载的Servlet时报错 Error running Tomcat 8.5.8: Unable to open debugger port (127.0.0.1:49551): java.net.SocketException

    学习Java Servlet时,从Wrox上下载了示例代码,准备run/debug时发现以下错误: Error running Tomcat 8.5.8: Unable to open debugge ...

  9. Launching web on MyEclipse Tomcat 问题

    错误提示: Launching web on MyEclipse Tomcat has encountered a problemAn internal error occurred during: ...

随机推荐

  1. Kotlin 介绍

    Kotlin (0:00) 大家好,我是 Michael Pardo,今天我要给大家展示一下 Kotlin 这门语言,同时看看他如何让你在 Android 开发的时候更开心,更有效率. Kotlin ...

  2. 解决POST数据时因启用Csrf出现的400错误

    第一种解决办法是关闭Csrf public function init(){ $this->enableCsrfValidation = false; } 第二种解决办法是在form表单中加入隐 ...

  3. μC/OS-Ⅲ系统的任务切换和任务调度

    一.任务切换 在操作系统中当任务需要从一个任务切换到另外一个任务时,要将当前任务的现场保存到当前任务的堆栈中(当前任务现场主要指CPU相关寄存器),然后回复新任务的现场并执行新任务.这个叫做上下文切换 ...

  4. html页面清除缓存

    需求:页面每次打开时清除本页面的缓存. 页面打开时,由于缓存的存在,刚刚更新的数据有时无法在页面得到刷新,当这个页面作为模式窗口被打开时问题更为明显. 解决办法为: (1) 用HTML标签设置HTTP ...

  5. truncate,delete,drop的异同点

    说明:本文摘自oracle技术用户讨论组 truncate,delete,drop的异同点  注意:这里说的delete是指不带where子句的delete语句    相同点:truncate和不带w ...

  6. Ubuntu的多文件编译以及c语言的数组、函数

    闲言少叙,直接切入主题. 一.Linux下的多文件编译(Ubuntu系统). 对于小程序来说,往往一个.c文件就足够了,里面包含了各种主函数和功能函数,以及函数的声明等等.但是这样的弊端主要有两点,一 ...

  7. Httpclient请求数据(post)

    public static String loginCheck_POST_HttpClient(String name,String pass,String url){ String result = ...

  8. 例子:Background Audio Streamer Sample

    The Background Audio Streamer sample demonstrates how to create an app that uses a MediaStreamSource ...

  9. JavaScript之全局变量和隐式全局变量

    通过var创建的全局变量(任何函数之外的程序中创建)是不能被删除的. 无var创建的隐式全局变量(无视是否在函数中创建)是能被删除的.

  10. spring知识

    Spring以IoC.AOP问主要思想,鞥协同struts,hibernate,webwork,jsf,iBatis等框架. Spring最主要的思想史IoC(Inversion of Control ...