How to: Use Edit and Continue (C#)
This topic applies to:
Visual Studio Edition |
Visual Basic |
C# |
C++ |
J# |
Express |
No |
Yes |
No |
No |
Standard |
No |
Yes |
No |
No |
Pro/Team |
No |
Yes |
No |
No |
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.
Note |
---|
Edit and Continue is not supported when debugging 64-bit code, the Compact Framework, optimized code, mixed native/managed code, or SQL CLR 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.
See Also
Reference
Edit and Continue (Visual C#)
Supported Code Changes (C#)