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 <ben.kunkle@gmail.com>
This commit is contained in:
Piotr Osiewicz 2025-06-12 20:05:48 +02:00 committed by GitHub
parent c13be165cd
commit 1e244f4aff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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),