debugger: Fix spec violation with threads request being issued before debug session is initialized (#33627)

Follow-up to #32852. This time we'll check if the debug session is
initialized before querying threads.

Release Notes:

- Fix Zed's debugger issuing threads request before it is allowed to do
so per DAP specification.
This commit is contained in:
Piotr Osiewicz 2025-06-30 01:38:16 +02:00 committed by GitHub
parent d2cf995e27
commit bc5927d5af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 6 deletions

View file

@ -868,7 +868,7 @@ impl DebugPanel {
let threads =
running_state.update(cx, |running_state, cx| {
let session = running_state.session();
session.read(cx).is_running().then(|| {
session.read(cx).is_started().then(|| {
session.update(cx, |session, cx| {
session.threads(cx)
})

View file

@ -114,7 +114,7 @@ impl Console {
}
fn is_running(&self, cx: &Context<Self>) -> bool {
self.session.read(cx).is_running()
self.session.read(cx).is_started()
}
fn handle_stack_frame_list_events(