go: Use delve-dap-shim for spawning delve (#31700)

This allows us to support terminal with go sessions

Closes #ISSUE

Release Notes:

- debugger: Add support for terminal when debugging Go programs
This commit is contained in:
Piotr Osiewicz 2025-05-29 21:19:56 +02:00 committed by GitHub
parent 05692e298a
commit 070eac28e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 84 additions and 23 deletions

View file

@ -658,9 +658,13 @@ impl StdioTransport {
.stderr(Stdio::piped())
.kill_on_drop(true);
let mut process = command
.spawn()
.with_context(|| "failed to spawn command.")?;
let mut process = command.spawn().with_context(|| {
format!(
"failed to spawn command `{} {}`.",
binary.command,
binary.arguments.join(" ")
)
})?;
let stdin = process.stdin.take().context("Failed to open stdin")?;
let stdout = process.stdout.take().context("Failed to open stdout")?;