debugger: Focus child sessions if parent has never stopped (#32693)
Closes #ISSUE Release Notes: - When debugging JavaScript, Zed will now preselect child sessions by default.
This commit is contained in:
parent
e59fb2e16a
commit
4370628e30
3 changed files with 32 additions and 6 deletions
|
@ -404,7 +404,11 @@ impl DebugPanel {
|
|||
});
|
||||
(session, task)
|
||||
})?;
|
||||
Self::register_session(this, session, false, cx).await?;
|
||||
// Focus child sessions if the parent has never emitted a stopped event;
|
||||
// this improves our JavaScript experience, as it always spawns a "main" session that then spawns subsessions.
|
||||
let parent_ever_stopped =
|
||||
parent_session.update(cx, |this, _| this.has_ever_stopped())?;
|
||||
Self::register_session(this, session, !parent_ever_stopped, cx).await?;
|
||||
task.await
|
||||
})
|
||||
.detach_and_log_err(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue