While debugging a .NET Core console application in VS 2017, I'm unable to make an edit and then set the next statement. It gives me the error mentioned in the title:
For example, if I set the breakpoint where indicated by the comment, then debug, and modify the string in the first line directly above the breakpoint, I get the error:
static void Main(string[] args)
{
string x = "foo"; // modify this after debug breaks.
string y = "bar"; // breakpoint here
}
NOTE: this works as expected in a .NET Framework console application.
When I google the title of this OP, I get zero results, even if I split the two sentences from the error message into separate quoted strings. When I google without quotes, I get a number of results that don't provide an an answer. For example, this one is similar in that it starts out with "Unable to set the next statement" but then the rest is different. This one is also similar but again is different after the first sentence.
What is causing this?
I had exactly the same error message. I don't know why it worked but I resolved it by:
Options->Debugging->General->Use the legacy C# and VB expression evaluators
.After unchecking the flag again everything was still working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With