This repository was archived by the owner on Aug 28, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,8 @@ def stop_debug(self):
156156 def detach_debug (self ):
157157 """Detach a debugging session
158158 """
159- self .current_connection .detach ()
159+ if self .is_connected ():
160+ self .current_connection .detach ()
160161
161162 def handle_server_stopped (self ):
162163 """Handle when server gets disconnected
@@ -166,6 +167,8 @@ def handle_server_stopped(self):
166167 if self .has_pending_connections ():
167168 self .start_new_connection ()
168169 else :
170+ self .cleanup ()
171+
169172 self .debugging_stopped_signal .emit ()
170173
171174 def run_debug (self ):
Original file line number Diff line number Diff line change @@ -369,8 +369,6 @@ def handle_debugging_stopped(self):
369369 This handler should be called when the connection to
370370 xdebug is terminated.
371371 """
372- self .debugger .cleanup ()
373-
374372 # Only set breakpoints as init_breakpoints
375373 # if there are any breakpoints set
376374 if len (self .breakpoints ) > 0 :
@@ -389,8 +387,7 @@ def detach_debug(self):
389387 The debugging session will end, but the debuged script
390388 will terminate normally.
391389 """
392- if self .debugger .is_connected ():
393- self .debugger .detach_debug ()
390+ self .debugger .detach_debug ()
394391
395392 def handle_step_command (self ):
396393 """Handle step command
You can’t perform that action at this time.
0 commit comments