zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    海量数据处理:十道面试题与十个海量数据处理方法总结
    C++中的static及内存分配
    面试时如何向面试官提问
    面试题3:斐波那契数列与爬楼梯
    面试题1:二进制中1的个数
    面试题:单链表的几种处理
    js网页下载csv格式的表格
    解决背景图文字盖住html里面的dom元素
    使用element-ui的常见问题
    Promise-async-await处理函数
  • 原文地址:https://www.cnblogs.com/yonglianglee/p/3912524.html
Copyright © 2011-2022 走看看