-
Notifications
You must be signed in to change notification settings - Fork 645
Unable to debug terminal user interface #2151
Comments
I see the same when debugging using the editor. Can you see if using gdlv works? Both gdlv and VS Code use dlv to support the debugging feature. |
Doesn't seem to work in gdlv, though I might have something setup incorrectly. Currently I'm launching with this config in vscode {
"name": "Run Editor with external Delve",
"type": "go",
"request": "launch",
"mode": "remote",
"remotePath":"${workspaceRoot}/cmd/editor",
"port": 2345,
"host": "127.0.0.1",
"program": "${workspaceRoot}/cmd/editor",
}, Using this in a external terminal #/bin/bash
dlv debug `dirname ${BASH_SOURCE[0]}` -l 0.0.0.0:2345 --api-version=2 --headless=true -- server Able to hit breakpoints but would obviously like it to show up directly inside of vscode's debug output. If it helps at all |
I am not sure why this doesnt work in the first place, so I cant really answer this. The reason I asked you to check out gdlv was that if that doesnt work either, then the issue is with dlv itself and the way clients (gdlv & VS Code) talk to dlv. Also, since the author of gdlv and dlv are the same, and that they are Go developers themselves, they would be more qualified to figure this out than me :) |
I changed the launch.json to
In Debug Console get the response
So it appears to not be directly tied to dlv, does this help narrow the issue? |
That error is from dlv. So I would say it is related to dlv |
|
In that case #843 might help (I am not sure), where we are tracking the feature request to use a terminal instead of the debug console when debugging. |
I agree that adding Could vscode-go internally launch a new terminal, run headless dlv and attached to the new terminal? I'm unfamiliar with the vscode-go code base and don't know if all the right hooks are there to do what I'm proposing. |
As far as I know, #843 tracks exactly that. |
I tried bringing this up in Gopher Slack but no response.
So i have an interesting situation. Here is a super basic TUI
This runs with
go run main.go
from the integrated terminal with no issues but givespanic: open /dev/tty: no such device or address
Is there some special settings to have this work in the Debug Console or launch a go app in a new terminal while still attaching the debugger?
My
.vscode/launch.json
containsThe text was updated successfully, but these errors were encountered: