@@ -147,27 +147,38 @@ def setup_file_actions(self):
147147 self .quit_action .triggered .connect (self .close )
148148
149149 def setup_actions (self ):
150- self .start_debug_action = QAction ("Start" , self )
151- self .start_debug_action .setToolTip ("Start server (F1)" )
152- self .start_debug_action .setStatusTip (
153- "Start listening to for connections. Shortcut: F1"
150+ self .start_listening_action = QAction ("Start listening" , self )
151+ self .start_listening_action .setToolTip (
152+ "Start listening for new connections (F1)"
154153 )
155- self .start_debug_action .setShortcut (QKeySequence ("F1" ))
154+ self .start_listening_action .setStatusTip (
155+ "Start listening for incomming connections. Shortcut: F1"
156+ )
157+ self .start_listening_action .setShortcut (QKeySequence ("F1" ))
158+
159+ self .stop_listening_action = QAction ("Stop listening" , self )
160+ self .stop_listening_action .setToolTip (
161+ "Stop listening for new connections (F2)"
162+ )
163+ self .stop_listening_action .setStatusTip (
164+ "Stop listening to incomming connections. Shortcut: F2"
165+ )
166+ self .stop_listening_action .setShortcut (QKeySequence ("F2" ))
156167
157168 self .stop_debug_action = QAction ("Stop" , self )
158- self .stop_debug_action .setToolTip ("Stop server (F2 )" )
169+ self .stop_debug_action .setToolTip ("Stop debugging (F3 )" )
159170 self .stop_debug_action .setStatusTip (
160- "Stop listening to for connections . Shortcut: F2 "
171+ "Stop debugging the current request . Shortcut: F3 "
161172 )
162- self .stop_debug_action .setShortcut (QKeySequence ("F2 " ))
173+ self .stop_debug_action .setShortcut (QKeySequence ("F3 " ))
163174
164175 self .detach_debug_action = QAction ("Detach" , self )
165- self .detach_debug_action .setToolTip ("Detach from server (F3 )" )
176+ self .detach_debug_action .setToolTip ("Detach debugger (F4 )" )
166177 self .detach_debug_action .setStatusTip (
167- "Stop the debugging session, but let the PHP process end normally ."
168- " Shortcut: F3 "
178+ "Detach debugger from the current request ."
179+ " Shortcut: F4 "
169180 )
170- self .detach_debug_action .setShortcut (QKeySequence ("F3 " ))
181+ self .detach_debug_action .setShortcut (QKeySequence ("F4 " ))
171182
172183 self .run_debug_action = QAction ("Run" , self )
173184 self .run_debug_action .setToolTip ("Start/resume the script (F5)" )
@@ -208,7 +219,9 @@ def setup_toolbar(self):
208219 toolbar = QToolBar ("Main Toolbar" )
209220 toolbar .setObjectName ("main-toolbar" )
210221
211- toolbar .addAction (self .start_debug_action )
222+ toolbar .addAction (self .start_listening_action )
223+ toolbar .addAction (self .stop_listening_action )
224+ toolbar .addSeparator ()
212225 toolbar .addAction (self .stop_debug_action )
213226 toolbar .addAction (self .detach_debug_action )
214227 toolbar .addSeparator ()
@@ -235,7 +248,9 @@ def setup_menubar(self):
235248 view_menu .addAction (widget .toggleViewAction ())
236249
237250 debug_menu = menu_bar .addMenu ("&Debug" )
238- debug_menu .addAction (self .start_debug_action )
251+ debug_menu .addAction (self .start_listening_action )
252+ debug_menu .addAction (self .stop_listening_action )
253+ debug_menu .addSeparator ()
239254 debug_menu .addAction (self .stop_debug_action )
240255 debug_menu .addAction (self .detach_debug_action )
241256 debug_menu .addSeparator ()
@@ -247,13 +262,14 @@ def setup_menubar(self):
247262 self .setMenuBar (menu_bar )
248263
249264 def toggle_actions (self , enabled ):
265+ self .stop_debug_action .setEnabled (enabled )
250266 self .detach_debug_action .setEnabled (enabled )
251267 self .run_debug_action .setEnabled (enabled )
252268 self .step_over_action .setEnabled (enabled )
253269 self .step_into_action .setEnabled (enabled )
254270 self .step_out_action .setEnabled (enabled )
255271
256- self .start_debug_action .setEnabled (not enabled )
272+ self .start_listening_action .setEnabled (not enabled )
257273
258274 def get_file_browser (self ):
259275 return self .file_browser
0 commit comments