Reputation: 25984
I have already asked, and got a very good answer for debugging locally with delve(golang debugger).
Now I am trying to remote debug with Delve using VS Code.
I have got a sample app mentioned here, and further github linked to source code here. Note: The debug project is in a branch called debugging.
Are you able to make it work?
I have also created/opened an issue in the repo.
Upvotes: 4
Views: 3584
Reputation: 1754
To remotely debug a go project in 2025 here is the updated solution, I assume you got ssh access to your server and your source code is on server:
Based on your server restrictions if:
Remote - SSH
extensionConnect to...
install golang
, do it with downloading golang binary and scp to your server and follow install instructions on go download page/usr/local/go/bin
folder and scp to server, else download precompiled binaries of gopls
dlv
errcheck
gofmt
golangci-lint
and any binary which is needed by extensionUpvotes: 0
Reputation: 25984
The following worked:
I was sure I tried this before, but apparently not bout at the same time. Anyways happy go' lucky!
Upvotes: 5