Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Saurabh Jain
    I am using this extension to open folders in docker container
    but my Go extension doesn't seem to work for the go files opened in docker extension
    I have used Remote - Containers to open a folder in Docker Container
    but features like godef doesn't seem to work with the go files there
    Is there any workaround ?
    Wiki improvement hint: it would be nice if "cwd" launch configuration property was mentioned in https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code
    Also: when I cannot see the content of https://github.com/Microsoft/vscode-go/wiki/Settings-for-Visual-Studio-Code-Go-extension - I get "You do not have permission to update this wiki." error
    Odell Joseph
    Will native tabs come to vscode windows
    help plz where i ctrl + spac disk run 100 %
    Moritz Stückler
    Hey guys, I'm going crazy over the VS Code Go extension. I can build/install just finde via the Command line (both within VS Code and with external Terminal), but whenever I chose "Build" or "Install" via the VS Code extension the extension says it can't import certain packages. I have the exact same GOPATH set in the plugin as in the console. Any ideas what this might be?
    Moritz Stückler
    Nevermind, this is a problem with CGO and environment variables GOOS=linux
    Mengqi Wu
    Hi, I just found out that debug request 'launch' with mode 'remote' is deprecated. The suggested alternative is the request 'attach' with mode 'remote'. While trying to debug a go binary in a remote container, the breakpoints are not recognized because the source code is not present in the container. How do I go with debugging a binary in a remote container written in go?
    anybody here?
    Norbert Melzer
    when I using go1.13, the go compiler use module feature to finding packages
    start with debugging(f5). I can run my project/module code, go can using the go.mod file
    then find all packages from %GOPATH%/pkg/mod directory.
    but when I running my code throw Ctrl+F5(start without debugging), go can not found package using go-module feature.
    what's wrong?
    debug:start without debugging .
    I have already update it to use ${file} instead of ${fileDirname} in launch.json
    would u like to help me?
    Norbert Melzer
    I have no clue, I do not use windows and also do not do debugging and build, run, test through the terminal
    ohh,thanks a lot.
    Herman Bergwerf
    I get 'invalid type' for type asserted variables. As a solution I tried the language server but the language server is apparently so broken it doesn't even offer variable autocomplete :S
    Anyway, I would love some insight. I already followed the steps mentioned in the github issue about this. I re-installed the language server. I use gvm and I now use go 1.13
    undeclared function name in test file
    Nick Johnson

    When setting up a launch.json file for debugging, when I attempt to reference my projects .env file using the "envFile" attrib, the file seems to get parsed as a plain key/value pair, not as an actual .env file. References to env vars do not get expanded. Example:


    Does anyone know how to get this to work like it does when referenced from the command line?

    Michael McLaughlin

    hi all. i have this fn

    // Wrap a context, inheriting the values of the wrapped context
    // nolint:golint
    func Wrap(wrapped context.Context, context context.Context) context.Context {
        return &wrapper{wrapped, context}

    but am getting this error

        "resource": "filepath.go",
        "owner": "go-lint",
        "severity": 4,
        "message": "context.Context should be the first parameter of a function",
        "source": "go-lint",
        "startLineNumber": 24,
        "startColumn": 1,
        "endLineNumber": 24,
        "endColumn": 2
    anything i can do about this?
    Since this is a question and not an issue (yet), I should ask here:
    Whenever I do changes to the go project (go get or update a module, go generate something), these changes are not detected or reflected in vscode -> showing errors in the files, missing intellisense completion etc. Currently I need to reload the whole vscode window to fix that. Is there an easier way or should I do these steps in vscode and how/where? (I don't want to reload the window since I loose all terminal tabs this way, which is annoying for me)
    Daniel Estermann
    Hey guys, I face the following error, when I try to evaluate an expression theMap[NewPoint2D{13,15}] where theMap is a map[Point2D]int and Point2D is a struct (ms-vscode.go v2.570.954, delve v1.3.2)
    Failed to eval expression:  {
     "Expr": "theMap[Point2D{955,741}]",
     "Scope": {
      "goroutineID": 1,
      "frame": 0
     "Cfg": {
      "followPointers": true,
      "maxVariableRecurse": 1,
      "maxStringLen": 64,
      "maxArrayValues": 64,
      "maxStructFields": -1
    Eval error: expression *ast.CompositeLit not implemented
    Unable to eval expression: "expression *ast.CompositeLit not implemented"
    สุริยา เทียมแย้ม
    pls help me golang if save vscode use cpu
    Nisheeth Barthwal

    Hi! I'm trying to tackle a feature request on gopls golang/go#35877
    and was wondering if there's an easy way for me to debug/test gopls modifications without overwriting the binary with my custom compiled one with log messages everytime.

    Moreoever, within the logs, I can't seem to guess which particular language server request is responsible for triggering completion suggestions - codeAction & documentLink seem to be doing something but not quite. Any help in that direction is highly appreciated.


    Why vs is performing bad with module
    I have followed the vscode go extension wiki and put the setting from wiki page, still when I fix any issue editor doesn't resolve it untill i restart editor..
    I like vscode and seems time to move out, please help to resolve the issue.
    example after upgrading to golang 1.13.5 started getting something strange error for all imports
    could not import crypto/rand (no package for import crypto/rand)compiler
    never mind, I disabled the golang server and no issue now.
    Vijay Singh
    IntelliSense for golang is not working in VS code
    Hi guys, does anyone have the same problem that "Occurrences Highlight" doesn't work when vscode-go plugin is enabled?
    As I have described in microsoft/vscode-go#2972 with gif attached.
    Having issue installing dlv tool for debugging get access denied
    Dont get issue with other tools
    Yuri Kasperovich

    Hello all,

    I have two files within the same package: main.go and fibonacci.go. main.go is using function from fibonacci.go. When I hit Ctrl+F5 in VSCode being in the main.go file, it gives me the error that it can't find the fibonacci function definition. I assume, the the issue is that VSCode builds and runs only current file, which is main.go, but I need it to build and run both.

    How to run whole go package in VSCode, not only current file?

    Does anyone have a docker and vscode go extension howto anywhere? I am using the remote extension but it does weird things like corrupt on save the import names. It's very odd.