What version of Delve are you using (dlv version)?
1.25.2; build af3df277866d7175e816eab14e56611053d4cdea
What version of Go are you using? (go version)?
go version go1.25.3 X:nodwarf5 linux/amd64
What operating system and processor architecture are you using?
Gentoo Linux 6.12.41, Intel x86_64, Wayland, KDE
Description
Sometimes when I attempt to launch my executable via VSCode I get this error message:
Debug console:
Starting: $GOBIN/dlv dap --listen=127.0.0.1:42255 --log-dest=3 from /my/executable
DAP server listening at: 127.0.0.1:42255
In this particular case, my debug configuration is:
{
"name": "Run",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}"
}
But I've had this happen for many different configurations and I haven't been able to identify a parameter that triggers this. Part of the issue is that it happens more or less randomly; that is, I can't intentionally reproduce it. It just happens, whenever the gremlins in my computer feel like it.
If I change launch.json at all I'm able to launch again. Just now, I added then deleted white space (outside of any property or string), saved the file, and the error stopped happening. So there's definitely something weird happening, potentially related to vscode-go. I'm assuming this error report is not enough information to do anything about it; I guess I'm really asking for help/advice on how to debug this. I tried launching delve with delve, but that did not reproduce the issue. Also I haven't been able to reproduce the issue by directly launching with delve. Certainly the issue could be related to vscode-go, but I imagine it could also be some subtle caching issue, or something related to DAP mode, or all of the above. I've tried launching separately DAP mode then having vscode-go attach to that existing session, but I wasn't able to get that to work and I'm not sure it would reproduce the issue. Should I create a custom build/install of delve that includes debugging symbols and is unoptimized? Is it possible to tell delve to pause until a debugger attaches to it?
What version of Delve are you using (
dlv version)?1.25.2; build af3df277866d7175e816eab14e56611053d4cdea
What version of Go are you using? (
go version)?go version go1.25.3 X:nodwarf5 linux/amd64
What operating system and processor architecture are you using?
Gentoo Linux 6.12.41, Intel x86_64, Wayland, KDE
Description
Sometimes when I attempt to launch my executable via VSCode I get this error message:
Debug console:
In this particular case, my debug configuration is:
{ "name": "Run", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}" }But I've had this happen for many different configurations and I haven't been able to identify a parameter that triggers this. Part of the issue is that it happens more or less randomly; that is, I can't intentionally reproduce it. It just happens, whenever the gremlins in my computer feel like it.
If I change
launch.jsonat all I'm able to launch again. Just now, I added then deleted white space (outside of any property or string), saved the file, and the error stopped happening. So there's definitely something weird happening, potentially related to vscode-go. I'm assuming this error report is not enough information to do anything about it; I guess I'm really asking for help/advice on how to debug this. I tried launching delve with delve, but that did not reproduce the issue. Also I haven't been able to reproduce the issue by directly launching with delve. Certainly the issue could be related to vscode-go, but I imagine it could also be some subtle caching issue, or something related to DAP mode, or all of the above. I've tried launching separately DAP mode then having vscode-go attach to that existing session, but I wasn't able to get that to work and I'm not sure it would reproduce the issue. Should I create a custom build/install of delve that includes debugging symbols and is unoptimized? Is it possible to tell delve to pause until a debugger attaches to it?