From 1e244f4affa6239b93ae091d12bfabe93c6d4f66 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Thu, 12 Jun 2025 20:05:48 +0200 Subject: [PATCH] debugger: Do not swallow `port` property when converting launch.json (#32621) with JavaScript scenarios. Closes #32187 Release Notes: - Fixed `port` property not being respected in debug scenarios converted from VSC's launch.json Co-authored-by: Ben Kunkle --- crates/task/src/vscode_debug_format.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/task/src/vscode_debug_format.rs b/crates/task/src/vscode_debug_format.rs index 9426f87cb7b50411ac3f0553c0021ed596ef30d0..facde2bba001a5c2769328fd3b4b72f5e2048ff9 100644 --- a/crates/task/src/vscode_debug_format.rs +++ b/crates/task/src/vscode_debug_format.rs @@ -33,6 +33,9 @@ impl VsCodeDebugTaskDefinition { if let Some(config) = config.as_object_mut() { if adapter == "JavaScript" { config.insert("type".to_owned(), self.r#type.clone().into()); + if let Some(port) = self.port { + config.insert("port".to_owned(), port.into()); + } } } let definition = DebugScenario { @@ -149,6 +152,7 @@ mod tests { "X": "Y", }, "type": "node", + "port": 17, }), tcp_connection: Some(TcpArgumentsTemplate { port: Some(17),