Export (0) Print
Expand All

How to: Use Edit and Continue (C#)

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not applyTopic appliesTopic does not applyTopic applies

Standard

Topic does not applyTopic appliesTopic does not applyTopic applies

Pro and Team

Topic does not applyTopic appliesTopic does not applyTopic applies

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

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.

NoteNote:

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

  1. In break mode, make a change to your source code.

  2. 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

  1. On the Tools menu, click Options.

  2. In the Options dialog box, expand the Debugging node, and select Edit and Continue.

  3. 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.

Community Additions

ADD
Show:
© 2014 Microsoft