0

I am trying to get debugging to work for a couple of internal nuget packages. We use .net 8, the code is hosted on azure devops git repo, and the nuget packages are hosted on an Azure devops artifacts feed.

When I debug through my nuget package I see code that looks like it's been decompiled. It hasn't for example got the same local variable names as in the original code. Is this expected or should I be able to see the original code when debugging?

According to this web site https://github.com/dotnet/sourcelink it seems like things should just work for my setup but I'm not sure if they actually do.

4
  • SourceLink does not do decompilation. It only provides debugging links, based on the pdb, back to the source library. I would expect you will not ever see original variable names because of this. Commented Dec 2, 2024 at 18:11
  • 2
    When it's working, you will see the original source code, not decompiled code. Are you publishing the pdbs to Azure DevOps' symbol server? Did you configure your debugger to use your private symbol server? Commented Dec 2, 2024 at 20:03
  • Hi zivkan! Thanks for your comment. I didn't do any of those things becaues according to the documentation it shouldn't be necessary. From this page: github.com/dotnet/sourcelink I read: "If your project uses .NET SDK 8+ and is hosted by the above providers it does not need to reference any Source Link "packages or set any build properties." Commented Dec 3, 2024 at 9:35
  • The only thing SourceLink does is embed source repository URL in the pdb. The other things I mentioned are not optional. It's a misunderstanding of sourcelink to think you don't need to publish pdbs or configure the debugger to get the pdb from wherever you published the pdb. Commented Dec 4, 2024 at 9:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.