Debugger UI: Dynamic session contents (#28033)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ... --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
fdaf2a27bf
commit
22b937f27f
14 changed files with 663 additions and 537 deletions
|
@ -43,14 +43,6 @@ pub enum DebugPanelItemEvent {
|
|||
Stopped { go_to_stack_frame: bool },
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub enum ThreadItem {
|
||||
Console,
|
||||
LoadedSource,
|
||||
Modules,
|
||||
Variables,
|
||||
}
|
||||
|
||||
impl DebugSession {
|
||||
pub(crate) fn running(
|
||||
project: Entity<Project>,
|
||||
|
@ -60,7 +52,15 @@ impl DebugSession {
|
|||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> Entity<Self> {
|
||||
let mode = cx.new(|cx| RunningState::new(session.clone(), workspace.clone(), window, cx));
|
||||
let mode = cx.new(|cx| {
|
||||
RunningState::new(
|
||||
session.clone(),
|
||||
project.clone(),
|
||||
workspace.clone(),
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
});
|
||||
|
||||
cx.new(|cx| Self {
|
||||
_subscriptions: [cx.subscribe(&mode, |_, _, _, cx| {
|
||||
|
@ -81,6 +81,7 @@ impl DebugSession {
|
|||
}
|
||||
}
|
||||
|
||||
#[expect(unused)]
|
||||
pub(crate) fn shutdown(&mut self, cx: &mut Context<Self>) {
|
||||
match &self.mode {
|
||||
DebugSessionState::Running(state) => state.update(cx, |state, cx| state.shutdown(cx)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue