Windows-API-Code-Pack-1.1 icon indicating copy to clipboard operation
Windows-API-Code-Pack-1.1 copied to clipboard

Enable SourceLink to allow easier debugging (Step into the code of this library)

Open MagicAndre1981 opened this issue 7 years ago • 5 comments

Visual Studio 2017 supports a new debug option called SourceLink which adds a JSON file to the PDB (which is now part of the NuGet package) which tells the Visual Studio Debugger to fetch the .cs files from a repository like for JSON.net based on commit hash 7217c484e9705b5e76585c8b7fcd489c8e021c23

<SourceLink>
    <Conversion FilePath="/_/*" Uri="https://raw.githubusercontent.com/JamesNK/Newtonsoft.Json/7217c484e9705b5e76585c8b7fcd489c8e021c23/*" />
</SourceLink>

See the Json.net pull request how to do it.

MagicAndre1981 avatar Jun 26 '18 08:06 MagicAndre1981

I've not published new nuget packages but I believe I've now enabled this functionality

contre avatar Jan 24 '20 17:01 contre

ok, I see that you converted the project to new SDK style, with packages reference include, but still have old packages.config present. Delete old files. I'll test it when new nugets are published

MagicAndre1981 avatar Jan 27 '20 07:01 MagicAndre1981

the PDBs/snupkg file is missing on nuget for 1.1.4, so sourcelink can't work. @contre

MagicAndre1981 avatar Mar 06 '20 08:03 MagicAndre1981

how bout now? I forgot I was supposed to package and push them so I only just uploaded them.

contre avatar Mar 06 '20 19:03 contre

how bout now?

yes, it works now as expected, the symbols are loaded and I can step into the code:

image

MagicAndre1981 avatar Mar 09 '20 06:03 MagicAndre1981