x/tools/gopls: VS Code + Go Extension: Debug Console output mysteriously stopped working #49537
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Big Sur 11.4, Apple M1
go env
OutputWhat did you do?
Some time following a 'go mod tidy' + 'go get .', I launched one of my long-standing and unmodified launch.json configurations from a workspace opened on (not under, but exactly equal to) $GOPATH. I had been doing this all day long with no problems.
What did you expect to see?
A functioning Debug Console and no extension errors in the status bar.
What did you see instead?
A blank debugger console for build errors and runtime logging, and the following (bogus) error:
"Error loading workspace: You are outside of a module and outside of $GOPATH/src. If you are using modules, please open your editor to a directory in your module. If you believe this warning is incorrect, please file an issue: https://github.com/golang/go/issues/new."
Opening a child module folder, Debug Console output was restored. However, I have a number of local modules in the project and breaking up the workspace I've been using for many months into multiple workspaces just to avoid this issue will tank my efficiency.
I am blocked. I'd really appreciate a quick assist.
Not sure if the mod tidy + get had anything to do with it. All I picked up was Gin-Gonic and friends. Sifting through the diffs of the affected go.mod and go.sum, no dependencies were lost and all new dependencies were present in other modules in the same workspace. It might be a red herring. However I see no other diffs that might explain what happened.
The text was updated successfully, but these errors were encountered: