This documentation is archived and is not being maintained.

Edit and Continue, Debugging, Options Dialog Box

To access the Edit and Continue page, click the Tools menu and select Options. In the Options dialog box, expand the Debugging folder and select Edit and Continue. This page allows you to set the following options for Edit and Continue. For more information, see Edit and Continue.

Enable Edit and Continue
When selected, enables Edit and Continue.

Edit and Continue allows you to change your source code while your program is in break mode (with some limitations) and apply those changes without having to end the debug session and build your program again.

Note   Visual Studio .NET does not support Edit and Continue for Visual Basic or Visual C# code. For more information, see Limitations of Edit and Continue.
Invoked by debug commands
When selected, enables Edit and Continue to be invoked by execution commands such as Step.
Ask me first
When selected, execution commands open a dialog box before invoking Edit and Continue. This dialog box gives you a chance to cancel Edit and Continue.
Warn me about stale code
When selected, the debugger warns you about stale code with the Stale Code Warning dialog box. This option is set by default. For more information, see Stale Code Warning Dialog Box.

In some cases, Edit and Continue cannot apply code changes to the executable immediately, but may be able to apply the code changes later if you continue debugging. Edit and Continue updates the call at that time. Until the call exits, the source window shows the original code in gray. Because this code has been superceded by code changes, it is outdated or stale. You cannot edit stale code.

Relink code changes after debugging
When selected, relinks code changes after debugging.

Edit and Continue does not invoke custom build steps. If your program uses custom build steps, you may want to rebuild manually so that custom build steps can be invoked. In that case, you can disable relinking after Edit and Continue to ensure that you are prompted to manually rebuild.

Allow precompiling
When selected (the default), allows Edit and Continue to load and process precompiled headers in the background to speed up processing of code changes. Loading precompiled headers requires allocation of physical memory, which can be a problem if you are compiling on a machine with limited RAM. Under Windows NT or Windows 2000, you can determine if this might be a problem by using the Windows NT Task Manager to determine the amount of available physical memory while you are debugging. If this amount is greater than the size of your precompiled headers, Edit and Continue should have no problem. If the amount is less than the size of your precompiled headers, you can prevent Edit and Continue from loading precompiled headers in the background by clearing this option.
Allow me to edit C# files while debugging
When selected, allows you to edit files while debugging; however, Visual Studio cannot apply the code changes until you stop debugging, build a fresh version of the code, and restart the application. If you try to continue execution after editing code while debugging, the Unable to Apply Code Changes dialog box gives you the option of continuing or restarting.

Clearing this setting makes your files read-only so they cannot be edited while debugging.

Allow me to edit VB files while debugging
When selected, allows you to edit files while debugging; however, Visual Studio cannot apply the code changes until you stop debugging, build a fresh version of the code, and restart the application. If you try to continue execution after editing code while debugging, the Unable to Apply Code Changes dialog box gives you the option of continuing or restarting.

Clearing this setting makes your files read-only so they cannot be edited while debugging.

Warn me if I make changes
When selected, enables a warning dialog box (Unable to Apply Code Changes dialog box), which appears when you edit code while debugging and then choose Continue or Step.
Always restart my program after I make changes
When selected, disables the Unable to Apply Code Changes dialog box so it does not appear when you edit code while debugging and then choose Continue or Step. Instead, the debugger terminates execution of your program, builds a fresh version of the code (with the changes), and restarts the program.
Always ignore changes and continue debugging
When selected, disables the Unable to Apply Code Changes dialog box so it does not appear when you edit code while debugging and then choose Continue or Step. Instead, the debugger steps or continues execution in the old code (without the code changes).

See Also

Debugging, Options Dialog Box | Specifying Debugger Settings | Visual Studio Debugger Model | Limitations of Edit and Continue | Unable to Apply Code Changes dialog box

Show: