From e2c74d26e060521b48fb597d5b758d328ad4cfd6 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Fri, 20 Aug 2021 18:18:35 +0300 Subject: Add command to run debug target --- helix-term/src/commands.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'helix-term/src/commands.rs') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 74b272c6..1139a0dc 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -304,6 +304,7 @@ impl Command { select_textobject_inner, "Select inside object", dap_toggle_breakpoint, "Toggle breakpoint", dap_launch, "Launch debugger", + dap_run, "Begin program execution", suspend, "Suspend" ); } @@ -4326,3 +4327,12 @@ fn dap_launch(cx: &mut Context) { let _ = block_on(request).unwrap(); } } + +fn dap_run(cx: &mut Context) { + use helix_lsp::block_on; + + if let Some(debugger) = &mut cx.editor.debugger { + let request = debugger.configuration_done(); + let _ = block_on(request).unwrap(); + } +} -- cgit v1.2.3-70-g09d2