Add a way to test with dlv directly. Currrently not ready for the big time
This commit is contained in:
parent
244d7d8fdf
commit
054ea35428
1 changed files with 29 additions and 0 deletions
|
|
@ -1,4 +1,18 @@
|
|||
{
|
||||
"adapters": {
|
||||
"dlv-dap": {
|
||||
"variables": {
|
||||
"port": "${unusedLocalPort}"
|
||||
},
|
||||
"command": [
|
||||
"$HOME/go/bin/dlv",
|
||||
"dap",
|
||||
"--listen",
|
||||
"127.0.0.1:${port}"
|
||||
],
|
||||
"port": "${port}"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"run": {
|
||||
"adapter": "vscode-go",
|
||||
|
|
@ -12,6 +26,21 @@
|
|||
"env": { "GO111MODULE": "off" }
|
||||
}
|
||||
},
|
||||
"run-dap": {
|
||||
"adapter": "dlv-dap",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"env": { "GO111MODULE": "off" },
|
||||
|
||||
"mode": "debug", // debug|test
|
||||
"program": "${workspaceRoot}/hello-world.go"
|
||||
|
||||
// "args": [],
|
||||
// "buildFlags": ...
|
||||
// "stackTraceDepth": ...,
|
||||
// "showGlobalVariables": true,
|
||||
}
|
||||
},
|
||||
"run-exec": {
|
||||
// NOTE: To use this you _must_ disable optimistaion:
|
||||
// go build -o hello_world -gcflags="all=-N -l"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue