Debug Symbol Files in Visual Studio

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

The way in which Visual Studio and other debugging tools match an assembly and PDB file, is by using the assembly hash. This hash is stored in the .dll and .pdb files and must match for the debugging and source stepping to work.

When a .nupkg contains .pdb files, Visual Studio will not reach out to MyGet to download Symbols and sources. When trying to debug using this type of package, Visual Studio will find the .pdb on the disk instead of reaching out to MyGet to download it, and therefore will fail to step into the code because of that.

Prerequisites
  1. In Visual Studio, under Tools | Options (or Debug | Options) | Debugging | General , clear the Enable Just My Code field.

  2. Set Artifactory to be your Symbol Server in Visual Studio by going to Tools | Options | Debugging | Symbols and adding the virtual or local repository URL path.

    set Artifactory as your Symbol Server.png

To debug the Symbol files in Artifactory:

  1. Run the Visual Studio Debugger and type in your credentials.

    run the debug in Visual Studio.png

    Once logged in, the debugger scans the local cache and then goes to the virtual repository in Artifactory as displayed in the following example.

    Symbol_load_information.png
  2. Once the symbol is resolved by Visual Studio, proceed to debug the deployed Symbol file.