dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.73k stars 3.99k forks source link

Breakpoints incorrectly added after hot reload #73955

Open Bgajic-mono opened 1 month ago

Bgajic-mono commented 1 month ago

Version Used: Visual Studio 17.11.0 Preview 2.0

After editing the code and hitting the hot reload button all following breakpoints are being improperly added, e.g. a new file gets opened in a read-only mode and the breakpoint gets added there in a completely different spot.

The path to the opened read-only file has the following structure: ...\AppData\LocalServer\{some-id}\original-sub-path-to-the-file-being-edited. {some-id} look like a git unique id, it feels like its opening up a specific git commit or something (but I haven't been able to find it).

Rebuilding the whole app "fixes" the issue, until next hot reload and breakpoint addition which repeats the process above.

This issue started happening with Visual Studio 17.11.0 Preview 1.0. Version on which it worked fine: 17.10.0 Preview 1.0.

I'm posting it here because the "report a problem" visual studio page is repeatedly asking me to sign in (even after signing in) right after hitting the "Submit" button, it goes on then in a loop.

ToddGrun commented 1 month ago

@tmat -- Is this us or should it go to someone else like the debugger team?

ToddGrun commented 1 month ago

Will start with you @tmat, please reassign if not appropriate