I am using the Nuget package Newtonsoft.Json, which does not contain any PDB files. Some googling revealed that at some point gitlink was being used for this, but it is my understanding that gitlink still requires PDBs to be included in the Nuget package. Is there a supported way to get symbols/source for a specific json.net binary?
They're on symbol source
@JamesNK Hi!
I've stumbled upon the same question. I've figured out that Newtonsoft.Json.pdb is on Symbol Source, but I still cannot step into Newtonsoft.Json source code, because even when I specify https://nuget.smbsrc.net/ as the only symbol source in Visual Studio 2015 update3 + hotfixes, the pdb is downloaded from it, but has filenames with local paths, like C:\Development\Releases\Json\Working\Newtonsoft.Json\Working-Signed\Src\Newtonsoft.Json\JsonArrayAttribute.cs
In the output, the following message appears:
SRCSRV: Source server cannot retrieve the source code for file 'C:\Development\Releases\Json\Working\Newtonsoft.Json\Working-Signed\Src\Newtonsoft.Json\Linq\JObject.cs' in module 'C:\Projects\Prototype\ConsoleApplication5\ConsoleApplication5\bin\Debug\Newtonsoft.Json.dll'. Operation not supported. Unknown error: 0x80004005.
What am I expected to do with this? I don't have files in those paths on my machine. Should I download the source code from the github, hunting down right commit by hand and place it so the paths will match?
If that's the case, can you please consider (again) using GitLink? Because that's what would work out of the box for the consumers of the nuget package.
Note that if the PDBs are source indexed (as some, but not all, Newtonsoft.JSON pdb files are), the local paths aren't a problem; they will get mapped to the source files downloaded by SRCSRV. That being said, I took a look at the symbol information in the downloaded PDB for Newtonsoft.JSON.dll v9.0.1, and it seems to be incorrect. For example, the location of one file is specified as https://nuget.smbsrc.net/src/QueryExpression.cs/YifcCtl-tn-myaeCpFGu_TWM8CWPII_LE0z9v5XE0KA=/QueryExpression.cs, which returns a 404. You may want to just use DotPeek as a source/symbol server, as it will decompileand server up everything for you.
@DavidKDeutsch thanks for information! From it, it seems that we only have left to ask @JamesNK to fix urls in Newtonsoft.Json.pdb.
In the meantime, I'll give DotPeek a try, thanks @DavidKDeutsch. This is only a workaround though, because decompilation of IL cannot possibly reach the quality of the source code. Lambdas, async code, comments and all that - that's just lost during the compilation process.
I can't seem to step into it following symbol source docs. I went and checked and I don't see the latest versions here (https://www.symbolsource.org/Public/Metadata/NuGet/Project/Newtonsoft.Json)
I'll admit I'm not super familiar with symbolsource.org but Visual Studio 2015 cannot find symbols from their public list for Newtonsoft.Json.dll. Is there somewhere else we can get the symbol files? The link posted by niemyjski above also does not contain the latest version -- actually, it contains nothing after v7.0.1
Yeah, only up to version 7.0.1 seems to be on symbolsource. Please reopen. Edit: never mind, someone has opened a new issue #1666
Most helpful comment
I'll admit I'm not super familiar with symbolsource.org but Visual Studio 2015 cannot find symbols from their public list for Newtonsoft.Json.dll. Is there somewhere else we can get the symbol files? The link posted by niemyjski above also does not contain the latest version -- actually, it contains nothing after v7.0.1