Trying to use vscode debugger to debug my go code.
vscode runs all the .go files in the same dir using the following launch.json config file:
{
"name": "Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${relativeFileDirname}",
}
Obviously, I tried to change
"program": "${relativeFileDirname}", -> "program": "${file}", but it's not working.
In addition, is there a way I can run ut and not the whole file (or in this case the whole dir)?
modeparameter should be set todebugand nottest. You can take a look at this extensive documentation for setup steps, supported features, configurations, information on remote debugging and a troubleshooting guide: github.com/golang/vscode-go/wiki/debugging