Freigeben über


How to: Enable and disable Edit and Continue (C#, VB, C++)

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

You can disable or enable Edit and Continue in the Visual Studio Options dialog box at design time. Edit and Continue works only in debug builds. For more information, see Edit and Continue.

For native C++, Edit and Continue requires using the /INCREMENTAL option. For more information about feature requirements in C++, see this blog post and Edit and Continue (C++).

To enable or disable Edit and Continue:

  1. If you're in a debugging session, stop debugging (Debug > Stop Debugging or Shift+F5).

  2. In Tools > Options > (or Debug > Options) > Debugging > General, select Edit and Continue in the right pane.

    Note

    If IntelliTrace is enabled and you collect both IntelliTrace events and call information, Edit and Continue is disabled. For more information, see IntelliTrace.

  3. For C++ code, make sure Enable Native Edit and Continue is selected, and set the other options:

    • Apply changes on continue (Native only)

      If selected, Visual Studio automatically compiles and applies code changes when you continue debugging from a break state. Otherwise, you can choose to apply changes using Debug > Apply Code Changes.

    • Warn about stale code (Native only)

      If selected, gives warnings about stale code.

  4. Select OK.