1

I recently converted some of our .dlls to NuGet and they're working great except when debugging a call to the code in a package is obviously skipped over. So I started reading about PBD files and how to create symbols packages (e.g. MyPackage.symbols.nupkg). I get that the source is included in the .symbols version of the nupkg, but what I don't get is how to use that to make it work. I'd really rather not put our PBDs on SymbolSource.org - I just have my NuGet packages on a network share, so I tried including the .pbd files into the NuGet package but that didn't work, so I tried specifying the -Symbols option with NuGet pack and that just creates two versions of the nupkg - one that's just the regular nupkg and the other that's a sybols.nupkg, but when I use nuget init it doesn't install the symbols package. So I manually copied that to the file share and debugging still doesn't work. I even tried renaming the symbols.nupkg to just nupkg and pushing that to the share since it contains the source, but that didn't work either. How can I debug and step into code that's in NuGet packages that I've created and are hosted locally?

Ben_G
  • 770
  • 2
  • 8
  • 30

1 Answers1

0

You could add your assembly .pdb file and source file into your Nuget Package as src file. You could add them with NuGet Package Explorer.

And then add the file path in Solution -> Properties -> Debug Source Files and then you could debug your own packages with source code.

Detailed steps, you could refer to below thread.

Is it possible to host both regular and symbols packages in a NuGet local feed on a network share?

Weiwei
  • 3,674
  • 1
  • 10
  • 13