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
19.11k stars 4.04k forks source link

File opened locally via GTD with Source Link should not be "live" #59137

Open tmat opened 2 years ago

tmat commented 2 years ago

When GTD finds source file locally via Source Link it currently opens it directly using the local path. If the file is edited outside of VS the content is updated in the GTD view, which is incorrect since it no longer corresponds to the content used to compile the assembly. GTD should create and open a read-only copy of the file.

dotnet-issue-labeler[bot] commented 2 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

tmat commented 2 years ago

@davidwengier

davidwengier commented 2 years ago

Spoke with the debugger team, and whilst they currently use the local file directly in these scenarios, breakpoints etc. should still work if we copy to a temp file as long as we don't break the checksum somehow.