From 0f2e14f4a69e81caea1d823e73e1d7f741fac78c Mon Sep 17 00:00:00 2001 From: st0012 Date: Sat, 16 Jul 2022 14:52:59 +0100 Subject: [PATCH] Perform disconnection cleanup and return response before killing debuggee --- lib/debug/server_dap.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/debug/server_dap.rb b/lib/debug/server_dap.rb index 1735cbbdf..f30d28ae6 100644 --- a/lib/debug/server_dap.rb +++ b/lib/debug/server_dap.rb @@ -348,6 +348,9 @@ def process when 'disconnect' terminate = args.fetch("terminateDebuggee", false) + SESSION.clear_all_breakpoints + send_response req + if SESSION.in_subsession? if terminate @q_msg << 'kill!' @@ -361,9 +364,6 @@ def process end end - SESSION.clear_all_breakpoints - send_response req - ## control when 'continue' @q_msg << 'c'