dotnet / sourcelink

Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets
MIT License
1.25k stars 122 forks source link

Source Link not used when using Decompiled Code #585

Open chuckries opened 4 years ago

chuckries commented 4 years ago

Opened on behalf of @casz.

I can verify that Rider at least tries to open the sourcelink URL via fiddler (I know rider does not support authentication). while Visual Studio 2019 does not even attempt to open the source link URL. Visual Studio goes straight for decompiled code.

chuckries commented 4 years ago

@casz Once you decompile a module during a debug session, all source file lookups for that module will open the decompiled source and bypass Source Link. Is this happening even after you restart debugging? Can you provide more specific, detailed repro instructions?

Additionally, what is 'Require source files to exactly match the original version' in Tools -> Options -> Debugging -> General? This option should be enabled.

jetersen commented 4 years ago

My test is create a simple project with any nuget dependency be it private or public nuget package and control click into the class.

drauch commented 1 week ago

I have the same problem, I can't get sourcelink to work.

New debugging session, cleared symbol cache (although it's not a symbol server, and the PDB that has been built with sourcelink is part of the referenced NuGet package), and when I step in the modules window shows "partially decompiled" and I see the decompiled code without comments, etc.

Fiddler shows no HTTP(S) request going to our Git server.

Best regards, D.R.