debugger: Extract running state from DebugSession mode and remove mode field (#29646)

DebugSession.mode is no longer needed because project::debugger::Session
manages its own state now (booting, running, terminated), and removing
mode simplifies a lot of the code that uses running state.

I used Zed AI to do a good chunk of the refactor, but I doubled-checked
everything it did and changed a good amount of its updates.

Release Notes:

- N/A

Co-authored-by: Zed AI <ai@zed.dev>
This commit is contained in:
Anthony Eid 2025-04-30 01:57:53 -04:00 committed by GitHub
parent edf78e770d
commit 9767033985
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 158 additions and 288 deletions

View file

@ -106,10 +106,7 @@ async fn test_module_list(executor: BackgroundExecutor, cx: &mut TestAppContext)
let running_state =
active_debug_session_panel(workspace, cx).update_in(cx, |item, window, cx| {
cx.focus_self(window);
item.mode()
.as_running()
.expect("Session should be running by this point")
.clone()
item.running_state().clone()
});
running_state.update_in(cx, |this, window, cx| {