BaGet icon indicating copy to clipboard operation
BaGet copied to clipboard

has someone managed to set up a functioning way to debug into symbols with Baget on Linux, development on Windows and CD by a Gitlab instance?

Open ctindex opened this issue 3 years ago • 1 comments

I'm quite certain that the problem does not lie within Baget, but maybe some of the users can help me finding out the culprit:

192.168.103.82: contains both the Gitlab Runner and the BaGet instance, Ubuntu 20.04.2 LTS http: the custom library I am using

packing & pushing ✅

is done by Gitlab CI using the following commands:

dotnet pack ./*proj -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push "bin/Debug/*.nupkg" --source baget

both the nupkg and the snupkg are being pushed:

warn : No API Key was provided and no API Key could be found for 'http://192.168.103.82:5000/api/v2/package'. To save an API Key for a source use the 'setApiKey' command.
Pushing HTTP.0.0.7.nupkg to 'http://192.168.103.82:5000/api/v2/package'...
  PUT http://192.168.103.82:5000/api/v2/package/
  Created http://192.168.103.82:5000/api/v2/package/ 306ms
Your package was pushed.
warn : Found symbols package '*.snupkg', but no API key was specified for the symbol server. To save an API Key, run 'NuGet.exe setApiKey [your API key from http://www.NuGet.org]'.
Pushing HTTP.0.0.7.snupkg to 'http://192.168.103.82:5000/api/v2/symbol'...
  PUT http://192.168.103.82:5000/api/v2/symbol/
  Created http://192.168.103.82:5000/api/v2/symbol/ 222ms
Your package was pushed.

I checked that both files are physically available

  • package at /packages/http/0.0.7
  • symbol package at /symbols/http.pdb/9affcba5102349909cdb04e3806fd435ffffffff

settings in Visual Studio ✅

I set http://192.168.103.82:5000/api/download/symbols as active Symbol Server

project level settings ✅

the latest version of the package is referenced image

actual debugging 🔴

when I try to step into the first function of the httplib, I get the yadayada.cs not found message. VS actually calls the source server:

Quelle wird mithilfe des Quellservers gesucht...
In den Einstellungen zum Debuggen von Quelldateien für die aktive Projektmappe ist angegeben, dass der Benutzer nicht zum Suchen der Datei aufgefordert wird: /home/index/gitlab/builds/bCofCZ-z/0/yadayada/http/Client.cs.
Die Quelldatei "/home/index/gitlab/builds/bCofCZ-z/0/yadayada/http/Client.cs" wurde nicht gefunden.

but I'm suspecting it then tries to localize the file /home/index/gitlab/builds/bCofCZ-z/0/yadayada/http/Client.cs on my local (Windows) computer, which obviously fails.
So I guess VS manages to get the pdb-file from BaGet, because otherwise it wouldn't know the build-path 🤷

the package/dll itself is successfully downloaded onto my machine at C:\Users\me\.nuget\packages\http\0.0.7\lib\net5.0\HTTP.dll and is also available in the Debug directory of my application. the pdb file however is nowhere to be found.

Any ideas about what I could check or how I could find out what VS is actually trying zu achieve?

ctindex avatar Sep 14 '21 13:09 ctindex

  • Are you doing deterministic builds?
  • Verify settings in visual studio, just adding the symbol server is not enough afaik:
    • Debugging > General > Uncheck "Enable Just My Code"
    • Debugging > General > Check "Enable source server support"

Additional tip: Look into enabling SourceLink

From our internal wiki: image

dschuermans avatar May 27 '22 14:05 dschuermans