aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-09-04 07:28:11 +0000
committerDmitry Sharshakov2021-09-04 07:28:11 +0000
commit430c80ff2a09adf554e16052d9f478fdd49535b0 (patch)
treee6d2c59ecb9e263a628d9576aa171ed222e09bc1 /helix-term/src
parentc6186ce6004449846cbdd5d343c8682a9026feb4 (diff)
Fix crash when trying to select (view) threads when debuggee is running
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/dap.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index 5f16bcbb..3e2a1887 100644
--- a/helix-term/src/commands/dap.rs
+++ b/helix-term/src/commands/dap.rs
@@ -43,7 +43,10 @@ pub async fn select_thread_id(editor: &mut Editor, thread_id: isize, force: bool
// fetch stack trace
// TODO: handle requesting more total frames
- let (frames, _) = debugger.stack_trace(thread_id).await.unwrap();
+ let (frames, _) = match debugger.stack_trace(thread_id).await {
+ Ok(frames) => frames,
+ Err(_) => return,
+ };
debugger.stack_frames.insert(thread_id, frames);
debugger.active_frame = Some(0); // TODO: check how to determine this