Dinerdo
Dinerdo

Reputation: 582

Debugging edits to .NET core app in Visual Studio don't take effect

When I'm debugging a .NET core app in Visual Studio, I can pause it and make valid changes before resuming execution of the process. However, the process runs with the previous code and, when a breakpoint is hit, the highlighted text seems to only match the number of characters that were previously on that line.

Example:

Thread.Sleep(2000) becomes Thread.Sleep(123456), and the breakpoint will highlight the line up to the 4.

This only happens for .NET Core apps. Is this a bug, "feature", or a setting I can change?

Upvotes: 2

Views: 71

Answers (1)

Leo Liu
Leo Liu

Reputation: 76770

This only happens for .NET Core apps. Is this a bug, "feature", or a setting I can change?

What CamiloTerevinto said is right. This is a known Issue #7902 on GitHub that Edit and Continue does not work for .Net Core at this point in Visual Studio 2015.

For more information about VS2015 ENC changes, have a look at this blog entry: https://blogs.msdn.microsoft.com/devops/2015/04/29/net-enc-support-for-lambdas-and-other-improvements-in-visual-studio-2015/

Besides, this issue was resolved at the Visual Studio 2017 RTM. You can check it on Visual Studio 2017.

Upvotes: 2

Related Questions