Supported Code Changes (C++)

Edit and Continue handles most types of code changes. However, some changes cannot be applied during program execution. To apply these changes, you must stop execution and build a fresh version of the code.

The following C/C++ changes cannot be applied during a debugging session:

  • Most changes to global or static data.

  • Changes to executables that are copied from another machine and not built locally.

  • Changes to a data type that affect the layout of an object, such as data members of a class.

  • Adding more than 64k bytes of new code or data.

  • Adding variables that require a constructor at a point before the instruction pointer.

  • Changes that affect code that requires run-time initialization.

  • Adding exception handlers, in some instances.

  • Changes to resource files.

  • Changes to code in read-only files.

  • Changes to code without a corresponding PDB file.

  • Changes to code that has no object file.

If you make one of these changes and then try to apply code changes, an error or warning message appears in the Output window.

  • Edit and Continue does not update static libraries. If you make a change in a static library, execution continues with the old version and no warning is issued.

Edit and Continue for C/C++ is unavailable in the following debugging scenarios:

  • Debugging Windows Store apps or components.

  • Debugging on Windows 98.

  • Mixed-mode (native/managed) debugging.

  • Javascript debugging.

  • SQL debugging.

  • Debugging a dump file.

  • Editing code after an unhandled exception, when the Unwind the call stack on unhandled exceptions option is not selected.

  • Debugging an application by using Attach to instead of running the application by clicking Start on the Debug menu.

  • Debugging optimized code.

  • Debugging managed or native code when the target is a 64-bit application. If you want to use Edit and Continue, you must set the target to x86. (ProjectProperties, Compile tab, Advanced Compiler setting.).

  • Debugging an old version of your code after a new version failed to build because of build errors.