debuggingdebug-symbolssourcelink

Is there a way to view the SourceLink data in a PDB file in order to validate that SourceLink is working?


I created a targets file to enable SourceLink. When running the build, I was able to validate that the source_link.json files were being generated.

However, when I try to check the PDB with srctool.exe [PDB file path], it says the file is not source indexed.

Because SourceLink appears to be a newer process, I'm not sure if srctool.exe is compatible with it or not.

Is there any easy way to "break open" a PDB file and verify that the SourceLink information exists?


Solution

  • You can use the free tool dotpeek to see the content of the PDB via Tools->Show PDB content:

    enter image description here

    When you scroll to the end, you see the SourceLink entry if it was added:

    enter image description here