Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    build failing ?
    Even I've been getting the 'build failing' message along with 2 pop up messages on the bottom right that say 'couldn't start client gopls' and 'unsupported URI scheme: (gopls only supports file URIs)'. I'm new to this and honestly I don't completely understand what this means....could anyone please help me with this. Thanks.
    Ken Xuan
    Somehow the intellisense for the go extension in VSCode has stopped working for me? Not sure what has changed...
    GOPATH set to ~/go and GOROOT set to /usr/local/go
    why am i not able to browse the code
    go to definition is not working
    @neo-liang-sap yes i have the same problem now
    what is the solution.
    hello everyone .... i found a little bug today while playing around with visual code.
    this is the bug... if you didn't save the file and trying to test your code it might give you headache for no reason..... so kindly save your file before running it.
    vscode-go build failing.
    Alex Stoica
    Screenshot 2020-04-29 at 05.36.28.png
    Has anyone ever encountered this error on macos?
    this extension is horrible buggy garbage - I cannot believe that Microsoft would release an extension with this many bugs. VS Code is now so unstable that I'm going to switch entirely to IntelliJ. The people releasing this trash need to be fired.
    Amit Auddy
    vscode-go not working at all. :(
    Alex Converse
    Is there a way to run gofmt on save but still be able to manually invoke goimports via some other command?
    @itrack I added write permission to the file and fixed it. "chmod 666 cgo.a"
    Alex Converse
    To answer my own question, adding a command runner plugin like edonet.vscode-command-runner let me add a goimports command I can invoke manually.
    William Hockey
    I'm having some issues importing a go module - "could not import github.com/stripe/stripe-go/v71 (no package for import github.com/stripe/stripe-go/v71)" - yet there clearly is a go module there - https://github.com/stripe/stripe-go/blob/master/go.mod
    Asa Jay
    Color theme author here. VSCode 1.45 changed something to the text grammar scope of the "Debug Console" without mentioning it in the release notes. Probably this was undesired. I can't find the scope to specifically set the foreground text color of the the "Debug Console" anymore. What's the name of the scope? It certainly isn't listed here: https://code.visualstudio.com/api/references/theme-color
    Asa Jay
    nevermind, I've found it. I think the naming is bad though.
    Alessandro (Ale) Segala
    Hi when using gopls, how can I disable the real-time syntax error highlighting? Without the language server, it would highlight syntax errors on save only. With the language server, it shows syntax errors as I type. I find this very distracting and would like to turn it off and have it on-save only
    Coding Concepts

    Hi all, I've previously been using dlv for debugging but recently (perhaps since upgrading macos to Catalina?) I'm getting the following when attempting to debug applications or tests:

    # runtime/cgo
    ld: unknown option: -platform_version
    clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
    Process exiting with code: 1

    Has anyone else run into this issue and managed to fix it?

    6 replies
    Aaron Small
    hey folks, I'm stumped in figuring out where gopls gets its environment variables. this is causing a problem when running //go:generate and using a command relies on a plugin that needs to be in $PATH

    I've tried overriding them with

        "go.toolsEnvVars": {
            "PATH": "$HOME/go/bin:$PATH",

    but it doesn't seem to evaluate $PATH, so it overrides all existing

    Aaron Small
    oh, I figured it out. I launched vscode from a .desktop file. fixed when launching from a terminal with appropriate path set
    hi guys, how to fix this Version of Delve is too old for this version of Go
    mine is ver 1.14
    Collin K Cusce
    I been using vscode + Go for a while. Accidentally installed something called gopls and now all my code imports are showing errors
    how do I just undo whatever the heck I did, vscode prompted and I hit the wrong thing: full disclosure, I have no idea what gopls is and I dont code in Go much anymore, but I did for a stint last year
    Collin K Cusce
    I think I figured it out, I had to disable languageServer
    Hi. My main.go is under cmd subpackage under my project package. So far, I could not figure out how to configure launch.json. Is anyone able to configure launch.json to start debugging session with main.go not under project package level?
    I didn’t realize it was as easy as pointing to the file. This worked for me.
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
                "name": “Launch Your Go File",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "program": "${workspaceFolder}/cmd/main.go"

    Hi -- I'm trying to setup remote development on a remote Ubuntu server from my local MacBook, via vscode remote ssh. My remote Ubuntu server has go1.13 installed:

    $ go env
    CGO_CFLAGS="-g -O2"
    CGO_CXXFLAGS="-g -O2"
    CGO_FFLAGS="-g -O2"
    CGO_LDFLAGS="-g -O2"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build061610720=/tmp/go-build -gno-record-gcc-switches"

    However, I can't seem to install vscode's Go extension onto my remote Ubuntu server. The Install on SSH: <ip> button doesn't appear on the extension when browsing my locally installed extensions.

    Rodrigo Alencar
    hi, how do I run go projects that are not modules and are cloned outside gopath on vscode?
    Is there an extension in vs code, so I can use it to edit "normal" text as well? I don't like the plane dark theme in google docs.
    does anyone know how to execute this built-in command?
    NobbZ Bogie (Gitter) yes.
    NobbZ Depending on your definition of "normal text".