Launching the debugger automatically

Source: Internet
Author: User

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, openHKEY_LOCAL_MACHINEFolder.
  3. NavigateHKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Image File Execution options.
  4. UnderImage File Execution optionsFolder, 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-clickImage File Execution optionsFolder and chooseNew KeyFrom the shortcut menu.
    2. Right-click the new key and chooseRenameFrom the shortcut menu.
    3. Edit the key name to the name of your application, for example,myapp.exe.
  5. Right-clickMyapp.exeFolder and chooseNew String ValueFrom the shortcut menu.
  6. Right-click the new string value and chooseRenameFrom the shortcut menu.
  7. Change the namedebugger.
  8. Right-click the new string value and chooseModifyFrom the shortcut menu.

    TheEdit stringDialog box appears.

  9. InValue DataBox, typedevenv /debugexe.
  10. ClickOK.
  11. FromRegistryMenu, chooseExit.

    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.

    NoteIf the application is managed, Visual Studio launches with Debugger typeSet Auto. Before you debug, change Debugger typeFrom AutoTo MixedIn Property pagesDialog Box. For more information, see specifying debugger settings.
See also

Using the debugger

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.