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:
parent
edf78e770d
commit
9767033985
9 changed files with 158 additions and 288 deletions
|
@ -118,8 +118,8 @@ pub fn start_debug_session_with<T: Fn(&Arc<DebugAdapterClient>) + 'static>(
|
|||
workspace
|
||||
.panel::<DebugPanel>(cx)
|
||||
.and_then(|panel| panel.read(cx).active_session())
|
||||
.and_then(|session| session.read(cx).mode().as_running().cloned())
|
||||
.map(|running| running.read(cx).session().clone())
|
||||
.map(|session| session.read(cx).running_state().read(cx).session())
|
||||
.cloned()
|
||||
.ok_or_else(|| anyhow!("Failed to get active session"))
|
||||
})??;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue