Edit and Continue (Visual Basic): Unsupported Method and Property Body Edits
This topic applies to:
Edition |
Visual Basic |
C# |
F# |
C++ |
Web Developer |
---|---|---|---|---|---|
Express |
|||||
Pro, Premium, and Ultimate |
Edit and Continue enables you to stop program execution in Break mode, make changes to the executing code, and resume program execution with the newly incorporated changes. Declarative code edits that affect the public structure of a class are generally prohibited, but most edits you might make to a method, property body, or private declarations within a class are allowed. For more information, see Edit and Continue (Visual Basic): Unsupported Declaration Edits.
There are some exceptions described in the following sections. Whenever possible, Edit and Continue marks code that cannot be edited as light gray. If you need to make any of these unsupported changes, you must stop debugging, make the changes, and start a new debugging session.
Unsupported Changes to Static Local Variables
- Removing a static local variable.
Unsupported Changes to Iteration Constructs
Modifying the condition of a While loop, when the instruction pointer is in the condition.
Modifying the lower or upper bound of a For statement, when the instruction pointer is in the expression.
Adding or removing a Next loop, when the instruction pointer is used in the enumerator expression.
Adding a For Each loop, when the instruction pointer is in the body of the loop.
Changing the iterator of a For Each loop, when the instruction pointer is in the enumerator expression or the body of the loop.
Changing the enumerator expression of a For Each loop, when the instruction pointer is in the enumerator expression.
Unsupported Changes to Generics
- Changes to the generic method itself or generic method body are not supported. Instantiation of a generic type or calls to existing generic methods can be added, deleted, or changed.
Other Unsupported Changes
Changing the invocation statement of a method that is on the call stack.
Adding a Try...Catch block, when the instruction pointer ends up in the Catch block or the Finally block.
Removing a Try...Catch block, when the instruction pointer is in a Catchblock or the Finally block.
Adding six or more nested Try statements around the current instruction pointer.
Adding a Using block around the current instruction pointer.
Adding a SynchLock block around the current instruction pointer.
Adding, removing, or modifying a user-defined #region.
See Also
Tasks
How to: Apply Edits in Break Mode with Edit and Continue
Reference
Edit and Continue (Visual Basic): Unsupported Declaration Edits