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": {
|
"configurations": {
|
||||||
"run": {
|
"run": {
|
||||||
"adapter": "vscode-go",
|
"adapter": "vscode-go",
|
||||||
|
|
@ -12,6 +26,21 @@
|
||||||
"env": { "GO111MODULE": "off" }
|
"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": {
|
"run-exec": {
|
||||||
// NOTE: To use this you _must_ disable optimistaion:
|
// NOTE: To use this you _must_ disable optimistaion:
|
||||||
// go build -o hello_world -gcflags="all=-N -l"
|
// go build -o hello_world -gcflags="all=-N -l"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue