debugger: Use debugpy's suggested names for child sessions (#33885)

Just like vscode-js-debug, debugpy uses the `name` key in
StartDebuggingRequestArguments for this:


https://github.com/microsoft/debugpy/blob/0d65353cc6e519292296bf567bdc6dfa5bcd4ffc/src/debugpy/adapter/clients.py#L753

Release Notes:

- debugger: Made the names of Python subprocesses in the session list
more helpful.
This commit is contained in:
Cole Miller
2025-07-04 00:15:02 +00:00
committed by GitHub
parent 03ca2f4d2b
commit 38544e514a
+9
View File
@@ -660,6 +660,15 @@ impl DebugAdapter for PythonDebugAdapter {
self.get_installed_binary(delegate, &config, None, user_args, toolchain, false)
.await
}
fn label_for_child_session(&self, args: &StartDebuggingRequestArguments) -> Option<String> {
let label = args
.configuration
.get("name")?
.as_str()
.filter(|label| !label.is_empty())?;
Some(label.to_owned())
}
}
async fn fetch_latest_adapter_version_from_github(