This documentation is archived and is not being maintained.

How to: Work with Stale Code

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not applyTopic does not applyTopic appliesTopic does not apply

Standard

Topic does not applyTopic does not applyTopic appliesTopic does not apply

Pro and Team

Topic does not applyTopic does not applyTopic appliesTopic does not apply

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.

In some cases, Edit and Continue cannot apply code changes to the executable immediately, but might be able to apply the code changes later if you continue debugging. This happens if you edit a function that calls the current function or if you add more than 64 bytes of new variables to a function on the call stack

In such cases, the debugger continues executing the original code (called stale code) until the changes can be applied. The stale code appears as a temporary source file window in a separate source window, with a title such as enc25.tmp. The edited source continues to appear in the original source window. If you try to edit the stale code, a warning message appears.

NoteNote:

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To enable or disable the stale code warning

  1. On the Tools menu, click Options.

  2. In the Options dialog box, select the Debugging folder.

  3. In the Edit and Continue group, select or clear the Warn me about stale code check box.

  4. Click OK.

Show: