How to: Use Edit and Continue (C#)
This article applies to Visual Studio 2015. 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
With Edit and Continue for C#, you can make changes to your code in break mode while debugging. The changes can be applied without having to stop and restart the debugging session.
Edit and Continue is invoked automatically when you make changes in break mode, then choose a debugger execution command, such as Continue, Step, or Set Next Statement, or evaluate a function in a debugger window.
Edit and Continue is not supported when debugging the Compact Framework, optimized code, mixed native/managed code, or SQL Server common language runtime (CLR) integration code. If you try to apply code changes in one of these scenarios, the debugger puts up a dialog box explaining that Edit and Continue is not supported.
To invoke Edit and Continue automatically
In break mode, make a change to your source code.
From the Debug menu, click Continue, Step, or Set Next Statement or evaluate a function in a debugger window.
The new code is compiled and the debugging continues with the new code. Some changes are not supported by Edit and Continue. For more information, see Supported Code Changes (C#).
To enable/disable Edit and Continue
On the Tools menu, click Options.
In the Options dialog box, expand the Debugging node, and select Edit and Continue.
In the Options dialog box Edit and Continue page, select or clear the Enable Edit and Continue check box.
The setting takes effect when you restart the debugging session.
Edit and Continue (Visual C#)
Supported Code Changes (C#)
Edit and Continue Errors and Warnings (C#)