on master help sign in
Fix crash when trying to select (view) threads when debuggee is running
commit430c80ff2a09adf554e16052d9f478fdd49535b0 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSat 4 Sep 2021, 10:28 (5 years ago) parentc6186ce
1 file changed+4−1
helix-term/src/commands/dap.rs+4−1
helix-term/src/commands/dap.rs+4−1
@@ -43,7 +43,10 @@ pub async fn select_thread_id(editor: &mut Editor, thread_id: isize, force: bool
4343
4444 // fetch stack trace
4545 // TODO: handle requesting more total frames
46− let (frames, _) = debugger.stack_trace(thread_id).await.unwrap();
46+ let (frames, _) = match debugger.stack_trace(thread_id).await {
47+ Ok(frames) => frames,
48+ Err(_) => return,
49+ };
4750 debugger.stack_frames.insert(thread_id, frames);
4851 debugger.active_frame = Some(0); // TODO: check how to determine this
4952