Skip to content

Instantly share code, notes, and snippets.

@uloureiro
Created July 9, 2021 18:33
Show Gist options
  • Save uloureiro/b914d134e6f316faf20349d2b6b6a577 to your computer and use it in GitHub Desktop.
Save uloureiro/b914d134e6f316faf20349d2b6b6a577 to your computer and use it in GitHub Desktop.
[Run and Debug in VSCode] #golang
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run and Debug",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceFolder}/cmd/server/main.go", // the path of your starting point
            "envFile": "${workspaceFolder}/env.local", // the paths to other files eventually within the env file need to be absolute
            "cwd": "${workspaceFolder}" // this is important when your `main.go` isn't in the root of the project
        },
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment