From 9d6b2e8a32308ae1b497f846f58f44660d0965b2 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Tue, 1 Jul 2025 17:09:19 -0400 Subject: [PATCH] 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. --- crates/dap_adapters/src/javascript.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/dap_adapters/src/javascript.rs b/crates/dap_adapters/src/javascript.rs index 67adb5629b..fd48c59959 100644 --- a/crates/dap_adapters/src/javascript.rs +++ b/crates/dap_adapters/src/javascript.rs @@ -522,7 +522,11 @@ impl DebugAdapter for JsDebugAdapter { } fn label_for_child_session(&self, args: &StartDebuggingRequestArguments) -> Option { - 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()) } }