C# Edit and Continue: error 4009
Updating a [using alias | field | event | fixed size buffer | constant | attribute] will prevent the debug session from continuing while Edit and Continue is enabled
This error indicates that you tried to modify a using alias, field initializer, attribute target, or attribute arguments.
Consider the following example code:
class Program
{
private int Example = 10;
static void Main() { }
}
If you step into the application, then try to change the Example = 10 to Example = 20, the error occurs.
To correct this error
Undo the changes, then continue debugging without the changes
-or-
On the Debug menu, click Stop Debugging, make the changes, then start a new debugging session.