go-delve DAP remote debugger process manager
Make sure that you have same file path or it wont debug/compile.
You can use rsync, or similar software.
go install github.com/go-delve/delve/cmd/dlv@latest
go install github.com/ii64/go-dlv-manager@latest
File launch.json
{
"configurations": [
{
"name": "Launch file",
"type": "go",
"request": "launch",
"mode": "exec", // exec, debug, see more at `dlv dap --help`
"program": "${file}",
"showRegisters": true, // unecessary
"logOutput": "rpc", // unecessary
"port": 7456,
"host": "127.0.0.1"
}
]
}
File .dlvman.toml
[conf]
Addr = "0.0.0.0:7456"
Program = "dlv"
ProcessArgs = ["dap", "--check-go-version=false", "--log-dest=3"]
Debug = false
Both running on the same computer, arm64 running on top of QEMU emulation. It took some time to build the program inside the emulator, but this can be avoided by compiling it on the host machine.
GOARCH=arm64 go build -gcflags "all=-N -l" main.go
On launch.json
, you just need to change these line:
"mode": "exec",
"program": "${workspaceFolder}/main",
amd64 | arm64 (Cortex-A53) |
---|---|
The go-dlv-manager
is under the MIT license.