Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alex Stoica
    @itrack
    Has anyone ever encountered this error on macos?
    OGANICA
    @OGANICA
    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
    @amitauddy
    vscode-go not working at all. :(
    Alex Converse
    @aconverse
    Is there a way to run gofmt on save but still be able to manually invoke goimports via some other command?
    diaton
    @diaton
    @itrack I added write permission to the file and fixed it. "chmod 666 cgo.a"
    Alex Converse
    @aconverse
    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
    @williamhockey_twitter
    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
    @freeo
    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
    @freeo
    nevermind, I've found it. I think the naming is bad though.
    "debugTokenExpression.value"
    Alessandro (Ale) Segala
    @ItalyPaleAle
    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
    @codingconcepts

    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
    @aasmall
    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
    @aasmall
    oh, I figured it out. I launched vscode from a .desktop file. fixed when launching from a terminal with appropriate path set
    ChungHuuLoc
    @ChungHuuLoc
    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
    @collincusce
    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
    @collincusce
    I think I figured it out, I had to disable languageServer
    jpark-olivawtech
    @jpark-olivawtech
    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?
    jpark-olivawtech
    @jpark-olivawtech
    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"
            },
        ]
    }
    sachnk
    @sachnk

    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
    GO111MODULE=""
    GOARCH="amd64"
    GOBIN=""
    GOCACHE="/home/ubuntu/.cache/go-build"
    GOENV="/home/ubuntu/.config/go/env"
    GOEXE=""
    GOFLAGS=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GONOPROXY=""
    GONOSUMDB=""
    GOOS="linux"
    GOPATH="/home/ubuntu/go"
    GOPRIVATE=""
    GOPROXY="https://proxy.golang.org,direct"
    GOROOT="/usr/lib/go-1.13"
    GOSUMDB="sum.golang.org"
    GOTMPDIR=""
    GOTOOLDIR="/usr/lib/go-1.13/pkg/tool/linux_amd64"
    GCCGO="gccgo"
    AR="ar"
    CC="gcc"
    CXX="g++"
    CGO_ENABLED="1"
    GOMOD=""
    CGO_CFLAGS="-g -O2"
    CGO_CPPFLAGS=""
    CGO_CXXFLAGS="-g -O2"
    CGO_FFLAGS="-g -O2"
    CGO_LDFLAGS="-g -O2"
    PKG_CONFIG="pkg-config"
    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
    @drigo-alencar
    hi, how do I run go projects that are not modules and are cloned outside gopath on vscode?
    Bogie
    @Chagchen
    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.
    MinJungSung
    @MinJungSung
    vscode.commands.executeCommand
    does anyone know how to execute this built-in command?
    matrixbot
    @matrixbot
    NobbZ Bogie (Gitter) yes.
    NobbZ Depending on your definition of "normal text".
    charankrb
    @charankrb
    hello I am a newbie to Go, I am trying to jump to function definition in VS Code but VS code fails to go to the definition with error "No Definition found" but with in the same package its working fine can some one help me
    Craig McNiel
    @craig.mcniel_gitlab

    Hi all - Struggling with my configuration and need some help. I'm trying to use environment variables in my current project to inject secure configuration data that I will use for running go tests that leverage network services.

    Every configuration I have tried fails to import/set the needed variables when I use "run test / debug test"

    Currently I have tried using
    "envFile" in my launch config to ${workspace}/.env "env": { "key": "value" } in launch config
    *Setting the "Go: Test Env File" to my .env file in the extension setting
    (This actually create an error when running "debug tests" Cannot load environment variables from file <path>/.env

    None of these seem to inject the needed variables into the environment so that I can us os.LookupEnv to retrieve them. Any clue what I'm doing wrong ? I'm on the latest version of VScode for Mac with current extensions.

    My current launch.json looks like below.

    Thanks in advance !

        // 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",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}",
            "env": {
                "LDAPUSER": "<redacted>",
                "LDAPPASS": ""<redacted>,
                "LDAPSERV": "<redacted>"
            },
            "args": [""],
            "showLog": true
        }]
    }
    冉天华
    @rantianhua
    @ramya-rao-a I encountered the same problem with microsoft/vscode-go#1421. The console log showed the following message: Error on CreateBreakpoint: could not find file /root/mr-weather-backend/pkg/widget/v1/service.go
    But I can find the file on the remote host.
    MoriX
    @MrMorteZw
    can someone please help me to setup golang on windows I have installed 4 different ide but still doesn't; work
    EagleMoor
    @eaglemoor

    Hi, I have a problem with vscode + macbook m1 chip. Details here go-delve/delve#2332

    But "go.alternateTools": {"dlv": "path_to_your_wrapper_script"} not working ...

    Junior
    @Muhammad-Waleed-Hafeez
    Hi. is there someone who could help with blazor-webassembly-chrome-extension related issues
    i have built a chrome-extension using blazor-webassembly and it works fine on browserAction button. but my main goal is to inject my blazor-extension-UI into a webpage.
    Rahulkrishnan R A
    @rahulkrishnanfs
    HI Guys, I have cloned a project but I could see that I cannot do GO TO DEFINITION for the exteranl dependencies , I have go all depedencies with $go mod download. Please advice how can I get definition of external packages which used as a dependencies
    1 reply
    Piyush Singariya
    @piyushsingariya

    Somehow the intellisense for the go extension in VSCode has stopped working for me? Not sure what has changed...

    What's the solution to this?

    1 reply
    maryamjahangiri
    @maryamjahangiri
    How can I solve this problem
    maryamjahangiri
    @maryamjahangiri

    "version" :"0.2.0"
    "configuration s":[
    "name":"(Windows) Launch";
    "type":"cppvsdbg";
    "request":"launch";
    "program":"enter program name ,for example ${workspaceFolder}/a.exe";
    "args":[];

    "StopAtEntry":false;
    "cwd":"${fileDirname}";
    "environment":[],
    "console:"externalTerminal"

    Please help 🥺
    NobbZ
    @NobbZ:matrix.org
    [m]
    How to solve which problem?
    maryamjahangiri
    @maryamjahangiri
    I can't run visual studio at all
    when I click on its icon show those statement that I wrote at up
    and I don't know to pass this to enter app
    NobbZ
    @NobbZ:matrix.org
    [m]
    Visual studio or visual studio code?
    And can you provide a screenshot of what you click and happens then?
    maryamjahangiri
    @maryamjahangiri
    I tried very hard to send the problem image in this chat but I do not know how it can be sent Can you help?
    This is my telegram id:@DNTPTHANKSGOD....Can you help me by telegram please?
    maryamjahangiri
    @maryamjahangiri
    I send screenshot of problem by element app for you
    NobbZ
    @NobbZ:matrix.org
    [m]

    Sorry, I was already out of office when you wrote, and I didn't receive any pictures.

    If in doubt try Imgur or similar services

    maryamjahangiri
    @maryamjahangiri
    Hello ,thanks ... it's solved . .l reinstalled another mingw and runner...then I could enter to app normally,however t
    hank you for your kindness .. I was encouraged..wherever you are, good luck