debugger: Start on tabless design (#27837)

![image](https://github.com/user-attachments/assets/1cd54b70-5457-4c64-95bd-45a7055ea165)

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
Piotr Osiewicz 2025-04-03 18:11:14 +02:00 committed by GitHub
parent 9986a21970
commit ece4a1cd7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1287 additions and 1092 deletions

View file

@ -1,20 +1,38 @@
use dap::debugger_settings::DebuggerSettings;
use debugger_panel::{DebugPanel, ToggleFocus};
use feature_flags::{Debugger, FeatureFlagViewExt};
use gpui::App;
use gpui::{App, actions};
use new_session_modal::NewSessionModal;
use session::DebugSession;
use settings::Settings;
use workspace::{
Pause, Restart, ShutdownDebugAdapters, StepBack, StepInto, StepOver, Stop,
ToggleIgnoreBreakpoints, Workspace,
};
use workspace::{ShutdownDebugAdapters, Workspace};
pub mod attach_modal;
pub mod debugger_panel;
pub mod session;
mod new_session_modal;
pub(crate) mod session;
#[cfg(test)]
mod tests;
pub mod tests;
actions!(
debugger,
[
Start,
Continue,
Disconnect,
Pause,
Restart,
StepInto,
StepOver,
StepOut,
StepBack,
Stop,
ToggleIgnoreBreakpoints,
ClearAllBreakpoints,
CreateDebuggingSession,
]
);
pub fn init(cx: &mut App) {
DebuggerSettings::register(cx);
@ -115,6 +133,23 @@ pub fn init(cx: &mut App) {
})
})
},
)
.register_action(
|workspace: &mut Workspace, _: &CreateDebuggingSession, window, cx| {
let debug_panel = workspace.panel::<DebugPanel>(cx).unwrap();
let weak_panel = debug_panel.downgrade();
let weak_workspace = cx.weak_entity();
workspace.toggle_modal(window, cx, |window, cx| {
NewSessionModal::new(
debug_panel.read(cx).past_debug_definition.clone(),
weak_panel,
weak_workspace,
window,
cx,
)
});
},
);
})
})