debugger: Use JS adapter's suggested names for child sessions (#32474)

Also introduces an extension point for other adapters to do this if it
turns out they also send this information.

Release Notes:

- N/A (JS locator is still gated)
This commit is contained in:
Cole Miller 2025-06-10 14:24:43 -04:00 committed by GitHub
parent 02dfaf7799
commit e0ca4270b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 5 deletions

View file

@ -431,4 +431,9 @@ impl DebugAdapter for JsDebugAdapter {
self.get_installed_binary(delegate, &config, user_installed_path, cx)
.await
}
fn label_for_child_session(&self, args: &StartDebuggingRequestArguments) -> Option<String> {
let label = args.configuration.get("name")?.as_str()?;
Some(label.to_owned())
}
}