From 7f150f7e0fe0da32df4c974b13e717f16e838e1f Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 11 Jun 2025 18:37:26 +0200 Subject: [PATCH] debugger: Fix preselection of debug adapters to not pick CodeLLDB by default (#32557) Closes #ISSUE Release Notes: - debugger: Fix preselection of debug adapters to not pick CodeLLDB by default --- crates/debugger_ui/src/new_process_modal.rs | 44 ++------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/crates/debugger_ui/src/new_process_modal.rs b/crates/debugger_ui/src/new_process_modal.rs index 22b4b692fab15ffad5619e88981bd6e4103dbaaf..a4d7c04dc30d65370c6389f3d3bc895d9d440c6c 100644 --- a/crates/debugger_ui/src/new_process_modal.rs +++ b/crates/debugger_ui/src/new_process_modal.rs @@ -477,10 +477,9 @@ impl NewProcessModal { .get_index_of(adapter.0.as_ref()) .unwrap_or(usize::MAX) }); - } - - if self.debugger.is_none() { - self.debugger = available_adapters.first().cloned(); + if self.debugger.is_none() { + self.debugger = available_adapters.first().cloned(); + } } let label = self @@ -1514,40 +1513,3 @@ pub(crate) fn resolve_path(path: &mut String) { ); }; } - -#[cfg(test)] -impl NewProcessModal { - // #[cfg(test)] - // pub(crate) fn set_configure( - // &mut self, - // program: impl AsRef, - // cwd: impl AsRef, - // stop_on_entry: bool, - // window: &mut Window, - // cx: &mut Context, - // ) { - // self.mode = NewProcessMode::Launch; - // self.debugger = Some(dap::adapters::DebugAdapterName("fake-adapter".into())); - - // self.launch_mode.update(cx, |configure, cx| { - // configure.program.update(cx, |editor, cx| { - // editor.clear(window, cx); - // editor.set_text(program.as_ref(), window, cx); - // }); - - // configure.cwd.update(cx, |editor, cx| { - // editor.clear(window, cx); - // editor.set_text(cwd.as_ref(), window, cx); - // }); - - // configure.stop_on_entry = match stop_on_entry { - // true => ToggleState::Selected, - // _ => ToggleState::Unselected, - // } - // }) - // } - - // pub(crate) fn save_scenario(&mut self, _window: &mut Window, _cx: &mut Context) { - // self.save_debug_scenario(window, cx); - // } -}