debugger: Prevent port collision when attaching to existing node debugger (#32862)

We were translating port configuration incorrectly, using it for both
attach target and debugger port.
This however meant that we were spawning a 2nd process that'd listen on
the same port as the existing debugger.

Closes #32836

Release Notes:

- debugger: Fixed issues with auto-translated Visual Studio Code debug
configs for attaching to existing node debugger instances.
This commit is contained in:
Piotr Osiewicz
2025-06-17 13:22:32 +00:00
committed by GitHub
parent 336c49b10d
commit a69ebf038a
2 changed files with 7 additions and 8 deletions
+3
View File
@@ -96,6 +96,9 @@ impl JsDebugAdapter {
.or_insert(delegate.worktree_root_path().to_string_lossy().into());
configuration.entry("type").and_modify(normalize_task_type);
configuration
.entry("console")
.or_insert("externalTerminal".into());
}
Ok(DebugAdapterBinary {