Skip to content

go binary not found even though PATH and even GOROOT is maintained correctly - plugin not working with latest 1.24 version #3688

Open
@rufreakde

Description

@rufreakde

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.24.0 darwin/arm64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • Build info
      ----------
      golang.org/x/tools/gopls v0.17.1
      golang.org/x/tools/gopls@v0.17.1 h1:Mt/DSfnnSe3dyf6MH/dZZ0iww+viHNhAFc4rEYDiOAw=
      github.com/BurntSushi/toml@v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=
      github.com/google/go-cmp@v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
      golang.org/x/exp/typeparams@v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ=
      golang.org/x/mod@v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
      golang.org/x/sync@v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
      golang.org/x/telemetry@v0.0.0-20241106142447-58a1122356f5 h1:TCDqnvbBsFapViksHcHySl/sW4+rTGNIAoJJesHRuMM=
      golang.org/x/text@v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
      golang.org/x/tools@v0.27.1-0.20241219162658-575221bfbda3 h1:kgwdasJRsdDWYgWcEgMF424DiXwwXHSb3V8xVTi//i8=
      golang.org/x/vuln@v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
      honnef.co/go/tools@v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I=
      mvdan.cc/gofumpt@v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU=
      mvdan.cc/xurls/v2@v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
      go: go1.24.0
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.97.2 e54c774e0add60467559eb0d1e229c6452cf8447 arm64
  • Check your installed extensions to get the version of the VS Code Go extension
    • Version 0.44.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

Image

Share 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 the go. or ["go"] or gopls prefixes.
"go.gopath": "/Users/d070210/go",
"go.goroot": "opt/homebrew/Cellar/go/1.24.0/libexec",
"go.testTags": "integrationtesting",

Describe the bug

My local setup always worked but somehow it stoped. Now I can run ginkgo tests but my intellisence and everything within vscode doesnt work. go commands work like a charm. GOROOT and PATH contain everything needed

Steps to reproduce the behavior:

  1. Go to 'start vscode'
  2. See error

Image

where go command results in: "/opt/homebrew/Cellar/go/1.24.0/libexec/bin/go"

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

zshrc:

export GOPATH=$HOME/go
export GOROOT=/opt/homebrew/Cellar/go/$(ls /opt/homebrew/Cellar/go)/libexec

export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions