diff --git a/lib/debug/server_cdp.rb b/lib/debug/server_cdp.rb index d4e012fe2..33358bf3d 100644 --- a/lib/debug/server_cdp.rb +++ b/lib/debug/server_cdp.rb @@ -489,7 +489,12 @@ def process id: SecureRandom.hex when 'Runtime.terminateExecution' send_response req - exit + if SESSION.in_subsession? + @q_msg << 'kill!' + else + @q_msg << 'kill!' + pause + end when 'Page.startScreencast', 'Emulation.setTouchEmulationEnabled', 'Emulation.setEmitTouchEventsForMouse', 'Runtime.compileScript', 'Page.getResourceContent', 'Overlay.setPausedInDebuggerMessage', 'Runtime.releaseObjectGroup', 'Runtime.discardConsoleEntries', 'Log.clear', 'Runtime.runIfWaitingForDebugger'