Sometimes, you may need to debug the startup code for an application that is launched by another process. Examples include services and custom setup actions. In these scenarios, you can have the debugger launch and automatically attach when your application starts.

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. In the Image File Execution Options folder, locate the name of the application you want to debug, such as myapp.exe. If you cannot find the application you want to debug:

    1. Right-click the Image File Execution Options folder, and on the shortcut menu, click New Key.

    2. Right-click the new key, and on the shortcut menu, click Rename.

    3. Edit the key name to the name of your application; myapp.exe, in this example.

  5. Right-click the myapp.exe folder, and on the shortcut menu, click New String Value.

  6. Right-click the new string value, and on the shortcut menu, click Rename.

  7. Change the name to debugger.

  8. Right-click the new string value, and on the shortcut menu, click Modify.

    The Edit String dialog box appears.

  9. In the Value data box, type vsjitdebugger.exe.

  10. Click OK.

  11. From the Registry menu, click Exit.

  12. The directory containing vsjitdebugger.exe must be in your system path. To add it to the system path, follow these steps:

    1. Open the Control Panel in Classic view, and double-click System.

    2. Click Advanced System Settings.

    3. In System Properties, click the Advanced tab.

    4. On the Advanced tab, click Environment Variables.

    5. In the Environment Variables dialog box, under System variables, select Path, then click the Edit button.

    6. In the Edit System Variable dialog box, add the directory to the Variable value box. Use a semicolon to separate it from other entries in the list.

    7. Click OK to close the Edit System Variable dialog box.

    8. Click OK to close the Environment Variables dialog box.

    9. Click OK to close the System Properties dialog box.

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

How to: Launch the Debugger Automatically的更多相关文章

  1. Launching the Debugger Automatically

    You can set up your application to start Visual Studio when you launch the application from Windows. ...

  2. Debugging JTAG Connectivity Problems

    2013-12-04 22:34:26 转自:http://processors.wiki.ti.com/index.php/Debugging_JTAG_Connectivity_Problems ...

  3. 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 ...

  4. 使用Visual Studio 利用WinGDB编译和远程调试嵌入式Linux的程序

    写这篇文章的目的在于帮助那些既要使用Visual Studio编写程序又要开发和调试嵌入式Linux 程序的苦命程序员们! 第一步, 安装 WinGDB ,下载位置  http://www.wingd ...

  5. Debugging Under Unix: gdb Tutorial (https://www.cs.cmu.edu/~gilpin/tutorial/)

    //注释掉 #include <iostream.h> //替换为 #include <iostream> using namespace std; Contents Intr ...

  6. IDAPython类库---idc.py的源码

    #!/usr/bin/env python #--------------------------------------------------------------------- # IDAPy ...

  7. 使用Visual Studio调试用户模式进程(Debugging a User-Mode Process Using Visual Studio)

    由于本人能力有限,翻译不足之处敬请谅解,欢迎批评指正:sunylat@163.com Visual Studio版本:Visual Studio 2015企业版,中文环境. MSDN原文:https: ...

  8. Visual Studio原生开发的10个调试技巧

    这篇文章只介绍了一些有关Visual Studio的基本调试技巧,但是还有其他一些同样有用的技巧.我整理了一些Visual Studio(至少在VS 2008下)原生开发的调试技巧.(如果你是工作在托 ...

  9. Visual Studio原生开发的10个调试技巧(一)

    最近碰巧读了Ivan Shcherbakov写的一篇文章,<11个强大的Visual Studio调试小技巧>.这篇文章只介绍了一些有关Visual Studio的基本调试技巧,但是还有其 ...

随机推荐

  1. HTML5应用:setCustomValidity(message)接口

    本文转自http://tid.tenpay.com/?p=3592 HTML5表单验证给前端人员带来了便利,但是在用户体验上存在一些缺陷,默认的提示对用户很不友好,无法准确的获取想要的信息.好在大牛们 ...

  2. typescript语言

    百度百科:2013年6月19日,在经历了一个预览版之后微软正式发布了正式版TypeScript 0.9

  3. 五、vue nextTick

    主线程的执行过程就是一个 tick,而所有的异步结果都是通过 "任务队列" 来调度被调度. 消息队列中存放的是一个个的任务(task). 规范中规定 task 分为两大类,分别是 ...

  4. Java实现身份证号码校验

    二话不说,直接上代码. package hope.identitycodecheck.demo; import java.text.DateFormat; import java.text.Simpl ...

  5. weex & web app & vue

    weex & web app & vue https://weex-project.io/tools/playground.html https://weex.apache.org/ ...

  6. poj 2240 Arbitrage (最短路径)

    Arbitrage Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13800   Accepted: 5815 Descri ...

  7. [Codeforces Round #513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) ](A~E)

    A: 题目大意:给你一个数字串,每个数字只可以用一次,求最多可以组成多少个电话号码(可以相同),电话号码第一个数字为$8$,且长度为$11$ 题解:限制为$8$的个数和总长度,直接求 卡点:无 C++ ...

  8. [ARC083F] Collecting Balls [建二分图+环套树定向+建拓扑图+树的拓扑序计数]

    题面 [传送门](https://arc083.contest.atcoder.jp/tasks/arc083_d) 思路 这是一道真正的好题 第一步:转化模型 行列支配类的问题,常见做法就是把行和列 ...

  9. 从K近邻算法、距离度量谈到KD树、SIFT+BBF算法

    转载自:http://blog.csdn.net/v_july_v/article/details/8203674/ 从K近邻算法.距离度量谈到KD树.SIFT+BBF算法 前言 前两日,在微博上说: ...

  10. 管理页面的类 PageHelper

    using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Da ...