Skip to content

Instantly share code, notes, and snippets.

@dineshsprabu
Last active June 8, 2018 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dineshsprabu/bac2e14f7e002dcdb570f396152afb09 to your computer and use it in GitHub Desktop.
Save dineshsprabu/bac2e14f7e002dcdb570f396152afb09 to your computer and use it in GitHub Desktop.
Setting up VSCode Golang

VSCode Download

https://code.visualstudio.com/download

Install Go extension

On VSCode, Goto Extension -> Search Go -> Install.

Installing delve debugger OSX. command dlv.

brew install -vd go-delve/delve/delve --HEAD

# Ignore errors

Debugger Configuration (Worked)

On default config, added useApiV1 as false.

{
    // 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": "Delve",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "remotePath": "",
            "port": 2345,
            "host": "127.0.0.1",
            "program": "${fileDirname}",
            "env": {},
            "args": [],
            "showLog": true,
            "useApiV1": false
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment