Closed
Description
What version of Go, VS Code & VS Code Go extension are you using?
- Run
go version
to get version of Go- go version go1.15.2 darwin/amd64
- Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders- 1.51.1
e5a624b788d92b8d34d1392e4c4d9789406efe8f
x64
- 1.51.1
- Check your installed extensions to get the version of the VS Code Go extension
- v0.18.1
- Run
go env
to get the go development environment details- GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/ss/Library/Caches/go-build"
GOENV="/Users/ss/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/ss/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/ss/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
...
- GO111MODULE=""
Share the Go related settings you have added/edited
None.
Describe the bug
Every time I restart vscode, it shows: Failed to find the "go" binary in either。GOROOT() or PATH(/usr/bin:/bin:/usr/sbin:/sbin). Check PATH, or Install Go and reload the window.
It seems the PATH(/usr/bin:/bin:/usr/sbin:/sbin
) from the message is not my actual path:
$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ which go
/usr/local/bin/go
And if I manually did Developer: reload window
once after terminal started, it would work without errors.
Steps to reproduce the behavior:
- Clear all settings about go in vscode, make it all defaults
- Make sure your executable go not in
/usr/bin:/bin:/usr/sbin:/sbin
- Add
sleep 15
to~/.bash_profile
to make terminal very slow to up - Restart vocode
Screenshots or recordings
Refs may help:
Metadata
Assignees
Labels
No labels