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 +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class PugdebugDebugger(QObject):
2828 current_file = ''
2929 current_line = 0
3030
31+ server_stopped_signal = pyqtSignal ()
3132 debugging_started_signal = pyqtSignal ()
3233 debugging_post_start_signal = pyqtSignal ()
3334 debugging_stopped_signal = pyqtSignal ()
@@ -202,17 +203,18 @@ def handle_post_start(self):
202203
203204 def stop_listening (self ):
204205 """Stop listening for new connections
206+
207+ Clear connections queue, stop debugging the current connection.
205208 """
209+ self .connections .clear ()
210+ self .stop_debug ()
211+
206212 self .server .stop_listening ()
207213
208214 def handle_server_stopped (self ):
209215 """Handle when the server stops listening to new connections
210216 """
211- self .connections .clear ()
212- self .stop_debug ()
213-
214- if not self .is_connected ():
215- self .debugging_stopped_signal .emit ()
217+ self .server_stopped_signal .emit ()
216218
217219 def stop_debug (self ):
218220 """Stop a debugging session
Original file line number Diff line number Diff line change @@ -183,6 +183,9 @@ def connect_debugger_signals(self):
183183 """
184184
185185 # Start/stop signals
186+ self .debugger .server_stopped_signal .connect (
187+ self .handle_server_stopped_listening
188+ )
186189 self .debugger .debugging_started_signal .connect (
187190 self .handle_debugging_started
188191 )
@@ -520,6 +523,9 @@ def handle_debugging_post_start(self):
520523 def stop_listening (self ):
521524 self .debugger .stop_listening ()
522525
526+ def handle_server_stopped_listening (self ):
527+ self .main_window .set_debugging_status (0 )
528+
523529 def stop_debug (self ):
524530 """Stop a debugging session
525531
You can’t perform that action at this time.
0 commit comments