• Launching the Debugger Automatically


    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_MACHINESoftwareMicrosoftWindows NTcurrentversionimage 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

  • 相关阅读:
    1053: 正弦函数
    1052: 数列求和4
    1051: 平方根的和
    1050: 阶乘的累加和
    POJ 1321 棋盘问题(搜索的方式)
    HDU 1176 免费馅饼
    BZOJ 2423 (求LCS的长度和种类数)
    HDU 2612 (2次BFS,有点小细节)
    POJ 1088 滑雪(模板题 DFS+记忆化)
    HRBUST 1186 青蛙过河 (思路错了)
  • 原文地址:https://www.cnblogs.com/yonglianglee/p/3912524.html
Copyright © 2020-2023  润新知