debugger: Don't take JS adapter's suggested child session name if it's empty (#33739)
Related to #33072 We use the JS adapter's suggested names for child sessions, but sometimes it sends us `""`, so don't use that one. Release Notes: - debugger: Fixed nameless child sessions appearing with the JavaScript adapter.
This commit is contained in:
parent
1d74fdc59f
commit
9d6b2e8a32
1 changed files with 5 additions and 1 deletions
|
@ -522,7 +522,11 @@ impl DebugAdapter for JsDebugAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn label_for_child_session(&self, args: &StartDebuggingRequestArguments) -> Option<String> {
|
fn label_for_child_session(&self, args: &StartDebuggingRequestArguments) -> Option<String> {
|
||||||
let label = args.configuration.get("name")?.as_str()?;
|
let label = args
|
||||||
|
.configuration
|
||||||
|
.get("name")?
|
||||||
|
.as_str()
|
||||||
|
.filter(|name| !name.is_empty())?;
|
||||||
Some(label.to_owned())
|
Some(label.to_owned())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue