on master help sign in
Drop and terminate debugger
commit6709b4242f5e052ea0c18de3b2211c04b26dc865 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSat 21 Aug 2021, 20:38 (5 years ago) parent26dee49
2 files changed+4
helix-term/src/application.rs+3 helix-term/src/commands.rs+1
helix-term/src/application.rs+3
@@ -187,6 +187,9 @@ impl Application {
187187 }
188188 }
189189 Some(payload) = self.editor.debugger_events.next() => {
190+ if self.editor.debugger.is_none() {
191+ continue;
192+ }
190193 let mut debugger = self.editor.debugger.as_mut().unwrap();
191194 match payload {
192195 Payload::Event(ev) => {
helix-term/src/commands.rs+1
@@ -4329,5 +4329,6 @@ fn dap_terminate(cx: &mut Context) {
43294329 if let Some(debugger) = &mut cx.editor.debugger {
43304330 let request = debugger.disconnect();
43314331 let _ = block_on(request).unwrap();
4332+ cx.editor.debugger = None;
43324333 }
43334334}