debugger: Start on tabless design (#27837)
 Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
9986a21970
commit
ece4a1cd7c
33 changed files with 1287 additions and 1092 deletions
|
@ -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,
|
||||
)
|
||||
});
|
||||
},
|
||||
);
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue