@@ -3,7 +3,9 @@ use helix_dap::Payload;
3use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
3use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
4use helix_view::{theme, Editor};
4use helix_view::{theme, Editor};
6−use crate::{args::Args, compositor::Compositor, config::Config, job::Jobs, ui};
7+ args::Args, commands::fetch_stack_trace, compositor::Compositor, config::Config, job::Jobs, ui,
8use log::error;
10use log::error;
@@ -273,7 +275,16 @@ impl Application {
273 all_threads_stopped,
275 all_threads_stopped,
278+ let all_threads_stopped = all_threads_stopped.unwrap_or_default();
280+ if all_threads_stopped {
281+ if let Ok(threads) = debugger.threads().await {
282+ for thread in threads {
283+ fetch_stack_trace(debugger, thread.id).await;
285+ select_thread_id(&mut self.editor, thread_id.unwrap_or(0), false).await;
276− if let Some(thread_id) = thread_id {
287+ } else if let Some(thread_id) = thread_id {
277 debugger.thread_states.insert(thread_id, reason.clone()); // TODO: dap uses "type" || "reason" here
288 debugger.thread_states.insert(thread_id, reason.clone()); // TODO: dap uses "type" || "reason" here
279 // whichever thread stops is made "current" (if no previously selected thread).
290 // whichever thread stops is made "current" (if no previously selected thread).
@@ -292,7 +303,7 @@ impl Application {
292 if let Some(text) = text {
303 if let Some(text) = text {
293 status.push_str(&format!(" {}", text));
304 status.push_str(&format!(" {}", text));
295− if all_threads_stopped.unwrap_or_default() {
306+ if all_threads_stopped {
296 status.push_str(" (all threads stopped)");
307 status.push_str(" (all threads stopped)");