5

I've included a NuGet package (Edge.js) that I would like to debug by stepping into the source code. When I "step in" it "steps over". I'm guessing this is because there are no symbol file to step in to. Possibly the EdgeJS package was published without sources and this could be the reason. However I don't know how to verify if a NuGet package contains the pdb symbols.

It might also be that I failed configuration of Visual Studio but because I don't know if the NuGet package contains symbols I don't know which way to look.

Thanks for any help

Johan Martinsson
  • 327
  • 2
  • 11
  • You should mention that Edje.js isn't a javascript framework/library despite its name. – Panagiotis Kanavos Mar 06 '15 at 16:02
  • This other question sheds some light on why it isn't available and how to make it so through symbolsource.org or other http://stackoverflow.com/questions/13488280/best-practices-with-nuget-debug-or-release?rq=1 – Johan Martinsson Mar 09 '15 at 13:06

2 Answers2

3

Nuget supports creating packages that contain PDB and source files with the nuget pack -Symbols command. Usually, these packages are uploaded to symbolsource.org for open source projects. Visual Studio can be configured to use symbolsource.org during debugging, see this guide.

However, not every open source project uploads symbol packages to symbolsource.org, so you have to check whether Edge.js does (I don't know that library).

If Edge.js does not provide symbol packages, your options are as follows:

  • Download the edge.js sources and build locally with debug symbols. Copy the DLL and the PDB to the output folder of your application and start debugging.
  • Use a decompiler. You don't get as much information as with the debug symbols and source files, but it may suffice for your case. The decompiler that ships with Resharper (commercial tool) is pretty useful for debugging DLLs in this manner.
theDmi
  • 17,546
  • 6
  • 71
  • 138
0

You can't "step-into" anything if you don't have the source code. Debug symbols won't help in this case.

You can step-into the decompiled code only by using third-party tools like RedGate's Reflector or Telerik's JustCode that decompile the IL on the fly and generate C# code for viewing purposes. These tools don't need the debug symbols to work, although they can use them to make the decompiled code more presentable.

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236
  • Ok that's terrific, but that shouldn't be necessary with the sources available. Also the quality of the decompilation is likely to be less readable. – Johan Martinsson Mar 09 '15 at 08:27
  • You mean that you do have the source code for Edge.js? That's a different question then, unrelated to NuGet - how can use step-into source code when you don't have accompanying debug symbols? You'll find many answers but the short version is - you can't if it's a release build as all debug info like source code references have been removed. You can, if it's a debug build, simply by pointing VS to the location of the source files – Panagiotis Kanavos Mar 09 '15 at 08:40
  • Right, so the problem is first of all that I'm using a release version that has no debug information included. I'm new to C# and a bit surprised to see that this easily doable as it would in java/maven. – Johan Martinsson Mar 09 '15 at 13:04
  • Actually, it is almost the same, see [here](http://stackoverflow.com/questions/8613535/does-java-have-debug-and-release-build-mode-like-c). You can include debug info in Release builds as well. Packages typically *don't* include debug info/symbols to reduce the package size but that's up to the author. – Panagiotis Kanavos Mar 09 '15 at 13:10