You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
reader := bufio.NewScanner(os.Stdin)
for reader.Scan() {
s := reader.Text()
if s == "" {
break
}
fmt.Println(s)
}
}
debug console:
Starting: d:\Go\bin\dlv-dap.exe dap --listen=127.0.0.1:59530
DAP server listening at: 127.0.0.1:59530
123
Unable to process evaluate: debuggee is running
eee
Unable to process evaluate: debuggee is running
-- I press Enter only --
Unable to process evaluate: debuggee is running
-- stop execute by Shift-F5 --
Detaching and terminating target process
dlv dap (1060) exited with code: 0
Stop program only by Shift-F5.
Debug not working.
Golang, VSCode and go plugin latest version.
OS Win10 Pro
The text was updated successfully, but these errors were encountered:
Debug Console is not designed for entering stdin. It's not a terminal, where your process is foregrounded and can read stdin. It's a REPL environment for evaluating expressions, which is only possible when the target is not running (otherwise you get an error message).
Here is what you can do instead:
Run dlv server in a separate server terminal, where it will foreground your process, so you can enter stdin into that terminal.
$ dlv-dap dap --listen=:54321
DAP server listening at: [::]:54321
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-1205.0.27
for x86_64.
Got a connection, launched process /Users/polina/delve/__debug_bin (pid = 8737).
123
read from stdin: 123
Exiting.
Use launch.json configuration to connect to this server. Essentially this means taking any existing launch configuration that already works for you and adding debugServer to it to tell it use an external server instead of launching one for you inside of vscode extension. For example,
debug console:
Starting: d:\Go\bin\dlv-dap.exe dap --listen=127.0.0.1:59530
DAP server listening at: 127.0.0.1:59530
123
Unable to process
evaluate
: debuggee is runningeee
Unable to process
evaluate
: debuggee is running-- I press Enter only --
Unable to process
evaluate
: debuggee is running-- stop execute by Shift-F5 --
Detaching and terminating target process
dlv dap (1060) exited with code: 0
Stop program only by Shift-F5.
Debug not working.
Golang, VSCode and go plugin latest version.
OS Win10 Pro
The text was updated successfully, but these errors were encountered: