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

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


0d65353cc6/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-03 20:15:02 -04:00 committed by GitHub
parent 03ca2f4d2b
commit 38544e514a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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(