question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to get sourcelink debugging to work

See original GitHub issue

Describe the bug

Using the latest docker image, digest a0cfdc486b50, I’m not able to get sourcelink to retrieve symbol packages while debugging.

My library contains the following:

    <PublishRepositoryUrl>true</PublishRepositoryUrl>
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <IncludeSymbols>true</IncludeSymbols>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>

Building on Jenkins:

+ dotnet pack -c Release /p:PackageVersion=1.0.4
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 404.4 ms for /var/lib/jenkins/workspace/SimpleLtc.Library.JwtMiddleware/src/SimpleLtc.Library.JwtMiddleware.csproj.
  SimpleLtc.Library.JwtMiddleware -> /var/lib/jenkins/workspace/SimpleLtc.Library.JwtMiddleware/src/bin/Release/netcoreapp3.1/SimpleLtc.Library.JwtMiddleware.dll
  Successfully created package '/var/lib/jenkins/workspace/SimpleLtc.Library.JwtMiddleware/src/bin/Release/SimpleLtc.Library.JwtMiddleware.1.0.4.nupkg'.
  Successfully created package '/var/lib/jenkins/workspace/SimpleLtc.Library.JwtMiddleware/src/bin/Release/SimpleLtc.Library.JwtMiddleware.1.0.4.snupkg'.
+ dotnet nuget push --source https://baget.sltc.local/v3/index.json --api-key **** src/bin/Release/SimpleLtc.Library.JwtMiddleware.1.0.4.nupkg
info : Pushing SimpleLtc.Library.JwtMiddleware.1.0.4.nupkg to 'https://baget.sltc.local/api/v2/package'...
info :   PUT https://baget.sltc.local/api/v2/package/
info :   Created https://baget.sltc.local/api/v2/package/ 22ms
info : Your package was pushed.
info : Pushing SimpleLtc.Library.JwtMiddleware.1.0.4.snupkg to 'https://baget.sltc.local/api/v2/symbol'...
info :   PUT https://baget.sltc.local/api/v2/symbol/
info :   Created https://baget.sltc.local/api/v2/symbol/ 7ms
info : Your package was pushed.

Nuget Package Explorer shows the relevant information: image

My application using this library has a launch configuration with the following:

"justMyCode": false,
"suppressJITOptimizations": true,

However, when I try to step into the library’s code, I get the following:

Loaded 'C:\dev\SimpleLtc.Api.MdsUpload\src\bin\Debug\netcoreapp3.1\SimpleLtc.Library.JwtMiddleware.dll'. Cannot find or open the PDB file.

Am I missing something or is this not working correctly?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
v0lcommented, Feb 25, 2021

I guess i done something wrong, i published a new version and its working ok now.

Previously i was using nuget push this time i used dotnet nuget push with the new version and it worked.

1reaction
queilcommented, Apr 6, 2020

@divinebovine Have look at my blog post. I show how to set up VS Code to make it work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't get Visual Studio to debug a SourceLink'd nuget ...
I'm having problems debugging a particular NuGet package from Visual Studio that claims to have SourceLink enabled.
Read more >
Improving Debug-time Productivity with Source Link - .NET ...
There are a couple steps to enable it: Go to Tools > Options > Debugging > Symbols and ensure that the 'NuGet.org Symbol...
Read more >
Why can't I debug my nuget package with sourcelink?
I've enabled source link in my csproj and used github actions to publish my nuget, but adding PublishRepositoryUrl property and referencing ...
Read more >
How to Configure Visual Studio to Use SourceLink to Step into ...
In order for SourceLink to work properly Visual Studio needs to be ... In Visual Studio, go to Tools –> Options –> Debugging...
Read more >
Link /SOURCELINK option seems to do nothing
We are using SourceLink with c# projects and it is working just fine. ... The c++ dll fails to find anything and shows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found