vscode-go
vscode-go copied to clipboard
gopls client: couldn't create connection to server
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
- Run
go versionto get version of Go from the VS Code integrated terminal.- go version go1.22.0 darwin/arm64
- Run
gopls -v versionto get version of Gopls from the VS Code integrated terminal.- zsh: killed ./gopls -v version
- Run
code -vorcode-insiders -vto get version of VS Code or VS Code Insiders.- 1.86.2
- Check your installed extensions to get the version of the VS Code Go extension
- v0.41.0
- Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Toolscommand.
# Tools Configuration
## Environment
GOBIN: undefined
toolsGopath:
gopath: /Users/<username>/.local/share/go
GOROOT: /opt/homebrew/Cellar/go/1.22.0/libexec
PATH: /opt/homebrew/opt/grep/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/findutils/libexec/gnubin:/opt/homebrew/opt/[email protected]/libexec/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/Users/<username>/.local/bin:/Users/<username>/.orbstack/bin
## Tools
go: /opt/homebrew/bin/go: go version go1.22.0 darwin/arm64
gopls: /Users/<username>/.local/share/go/bin/gopls (version: v0.14.2 built with go: go1.22.0)
gotests: not installed
gomodifytags: not installed
impl: not installed
goplay: not installed
dlv: not installed
staticcheck: /Users/<username>/.local/share/go/bin/staticcheck (version: v0.4.6 built with go: go1.22.0)
## Go env
Workspace Folder (try-go): /Users/<username>/codeplace/playground/try-go
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/<username>/Library/Caches/go-build'
GOENV='/Users/<username>/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/<username>/.cache/go/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/<username>/.local/share/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.0/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.0/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='/opt/homebrew/opt/llvm/bin/clang'
CXX='/opt/homebrew/opt/llvm/bin/clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/43/15hv0c3n3sq3svxrgxbr2ggw0000gn/T/go-build3464914985=/tmp/go-build -gno-record-gcc-switches -fno-common'
Share the Go related settings you have added/edited
I do not add anything.
Describe the bug
gopls cannot be connected. Even though I go installed the latest version of gopls, the extension reminds me that the gopls is outdated.
Steps to reproduce the behavior:
Open any Go project and enable vscode-go extension.
Screenshots or recordings
gopls(server):
gopls CLI is broken?