Open rodrigovsilva opened 3 years ago
@rodrigovsilva Thanks for the report. It looks like the current workspace root and pwd is ~/go/src/febo
(in module mode, because there is go.mod
file) and you want to debug ~/go/src/mytest/cmd/test-service
which is outside of your main module (~/go/src/febo
). I am afraid the debug adapter handles such case correctly. A couple of things to try (I am not sure if these will work yet):
cwd
to be ~/go/src
? ~/go/src/mytest
folder to your workspace?@suzmue @polinasok The relevant code path doesn't seem to handle this use case. From the user's report, I see
PWD: "/Users/rodrigo/go/src/febo"
and the launch request (mode: debug) has
"packagePathToGoModPathMap":{}
"program":"/Users/rodrigo/go/src/mytest/cmd/test-service",
The code path seems problematic for many reasons - i.e., it assumes the current Go workspace based on the GOPATH, which is no longer true in the module mode.
Please direct general questions to:
#vscode
channel in Gophers SlackPlease review the documentation before filing an issue. Helpful pages include:
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
Run
go version
to get version of Gogo version go1.14.13 darwin/amd64
Run
gopls -v version
to get version of Gopls if you are using the language server.Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code InsidersCheck your installed extensions to get the version of the VS Code Go extension
Run
go env
to get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file. Share all the settings with thego.
or["go"]
orgopls
prefixes.Describe the bug
I got an error when I try to debug my project
Steps to reproduce the behavior:
Trying to debug my application using launch.json