@@ -112,16 +112,7 @@ fn thread_picker(cx: &mut Context, callback_fn: impl Fn(&mut Editor, &dap::Threa
114 let thread_states = debugger.thread_states.clone();
114 let thread_states = debugger.thread_states.clone();
115− let mut top_frames: HashMap<isize, StackFrame> = HashMap::new();
115+ let frames = debugger.stack_frames.clone();
116− for thread in threads.clone() {
117− if let Some(frame) = block_on(debugger.stack_trace(thread.id))
119− .and_then(|(bt, _)| bt.get(0).cloned())
121− top_frames.insert(thread.id, frame);
125 let picker = FilePicker::new(
116 let picker = FilePicker::new(
127 move |thread| {
118 move |thread| {
@@ -136,7 +127,7 @@ fn thread_picker(cx: &mut Context, callback_fn: impl Fn(&mut Editor, &dap::Threa
137 move |editor, thread, _action| callback_fn(editor, thread),
128 move |editor, thread, _action| callback_fn(editor, thread),
138 move |_editor, thread| {
129 move |_editor, thread| {
139− if let Some(frame) = top_frames.get(&thread.id) {
130+ if let Some(frame) = frames.get(&thread.id).and_then(|bt| bt.get(0)) {
142 .as_ref()
133 .as_ref()