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:
parent
c13be165cd
commit
1e244f4aff
1 changed files with 4 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue