76 |
78 |
77 # read the saved debug info values |
79 # read the saved debug info values |
78 self.argvHistory = Preferences.toList( |
80 self.argvHistory = Preferences.toList( |
79 Preferences.Prefs.settings.value('DebugInfo/ArgumentsHistory')) |
81 Preferences.Prefs.settings.value('DebugInfo/ArgumentsHistory')) |
80 self.wdHistory = Preferences.toList( |
82 self.wdHistory = Preferences.toList( |
81 Preferences.Prefs.settings.value('DebugInfo/WorkingDirectoryHistory')) |
83 Preferences.Prefs.settings.value( |
|
84 'DebugInfo/WorkingDirectoryHistory')) |
82 self.envHistory = Preferences.toList( |
85 self.envHistory = Preferences.toList( |
83 Preferences.Prefs.settings.value('DebugInfo/EnvironmentHistory')) |
86 Preferences.Prefs.settings.value('DebugInfo/EnvironmentHistory')) |
84 self.excList = Preferences.toList( |
87 self.excList = Preferences.toList( |
85 Preferences.Prefs.settings.value('DebugInfo/Exceptions')) |
88 Preferences.Prefs.settings.value('DebugInfo/Exceptions')) |
86 self.excIgnoreList = Preferences.toList( |
89 self.excIgnoreList = Preferences.toList( |
87 Preferences.Prefs.settings.value('DebugInfo/IgnoredExceptions')) |
90 Preferences.Prefs.settings.value('DebugInfo/IgnoredExceptions')) |
88 self.exceptions = Preferences.toBool( |
91 self.exceptions = Preferences.toBool( |
89 Preferences.Prefs.settings.value('DebugInfo/ReportExceptions', True)) |
92 Preferences.Prefs.settings.value( |
|
93 'DebugInfo/ReportExceptions', True)) |
90 self.autoClearShell = Preferences.toBool( |
94 self.autoClearShell = Preferences.toBool( |
91 Preferences.Prefs.settings.value('DebugInfo/AutoClearShell', True)) |
95 Preferences.Prefs.settings.value('DebugInfo/AutoClearShell', True)) |
92 self.tracePython = Preferences.toBool( |
96 self.tracePython = Preferences.toBool( |
93 Preferences.Prefs.settings.value('DebugInfo/TracePython', False)) |
97 Preferences.Prefs.settings.value('DebugInfo/TracePython', False)) |
94 self.autoContinue = Preferences.toBool( |
98 self.autoContinue = Preferences.toBool( |
95 Preferences.Prefs.settings.value('DebugInfo/AutoContinue', True)) |
99 Preferences.Prefs.settings.value('DebugInfo/AutoContinue', True)) |
96 self.forkAutomatically = Preferences.toBool( |
100 self.forkAutomatically = Preferences.toBool( |
97 Preferences.Prefs.settings.value('DebugInfo/ForkAutomatically', False)) |
101 Preferences.Prefs.settings.value( |
|
102 'DebugInfo/ForkAutomatically', False)) |
98 self.forkIntoChild = Preferences.toBool( |
103 self.forkIntoChild = Preferences.toBool( |
99 Preferences.Prefs.settings.value('DebugInfo/ForkIntoChild', False)) |
104 Preferences.Prefs.settings.value('DebugInfo/ForkIntoChild', False)) |
100 |
105 |
101 self.evalHistory = [] |
106 self.evalHistory = [] |
102 self.execHistory = [] |
107 self.execHistory = [] |
105 self.clientType = "" |
110 self.clientType = "" |
106 self.lastAction = -1 |
111 self.lastAction = -1 |
107 self.debugActions = [self.__continue, self.__step,\ |
112 self.debugActions = [self.__continue, self.__step,\ |
108 self.__stepOver, self.__stepOut,\ |
113 self.__stepOver, self.__stepOut,\ |
109 self.__stepQuit, self.__runToCursor] |
114 self.__stepQuit, self.__runToCursor] |
110 self.localsVarFilter, self.globalsVarFilter = Preferences.getVarFilters() |
115 self.localsVarFilter, self.globalsVarFilter = \ |
111 self.debugViewer.setVariablesFilter(self.globalsVarFilter, self.localsVarFilter) |
116 Preferences.getVarFilters() |
|
117 self.debugViewer.setVariablesFilter( |
|
118 self.globalsVarFilter, self.localsVarFilter) |
112 |
119 |
113 # Connect the signals emitted by the debug-server |
120 # Connect the signals emitted by the debug-server |
114 debugServer.clientGone.connect(self.__clientGone) |
121 debugServer.clientGone.connect(self.__clientGone) |
115 debugServer.clientLine.connect(self.__clientLine) |
122 debugServer.clientLine.connect(self.__clientLine) |
116 debugServer.clientExit.connect(self.__clientExit) |
123 debugServer.clientExit.connect(self.__clientExit) |
117 debugServer.clientSyntaxError.connect(self.__clientSyntaxError) |
124 debugServer.clientSyntaxError.connect(self.__clientSyntaxError) |
118 debugServer.clientException.connect(self.__clientException) |
125 debugServer.clientException.connect(self.__clientException) |
119 debugServer.clientVariables.connect(self.__clientVariables) |
126 debugServer.clientVariables.connect(self.__clientVariables) |
120 debugServer.clientVariable.connect(self.__clientVariable) |
127 debugServer.clientVariable.connect(self.__clientVariable) |
121 debugServer.clientBreakConditionError.connect(self.__clientBreakConditionError) |
128 debugServer.clientBreakConditionError.connect( |
122 debugServer.clientWatchConditionError.connect(self.__clientWatchConditionError) |
129 self.__clientBreakConditionError) |
|
130 debugServer.clientWatchConditionError.connect( |
|
131 self.__clientWatchConditionError) |
123 debugServer.passiveDebugStarted.connect(self.__passiveDebugStarted) |
132 debugServer.passiveDebugStarted.connect(self.__passiveDebugStarted) |
124 debugServer.clientThreadSet.connect(self.__clientThreadSet) |
133 debugServer.clientThreadSet.connect(self.__clientThreadSet) |
125 |
134 |
126 debugServer.clientRawInput.connect(debugViewer.handleRawInput) |
135 debugServer.clientRawInput.connect(debugViewer.handleRawInput) |
127 debugServer.clientRawInputSent.connect(debugViewer.restoreCurrentPage) |
136 debugServer.clientRawInputSent.connect(debugViewer.restoreCurrentPage) |
179 self.runProjectAct.setStatusTip(self.trUtf8('Run the current Project')) |
190 self.runProjectAct.setStatusTip(self.trUtf8('Run the current Project')) |
180 self.runProjectAct.setWhatsThis(self.trUtf8( |
191 self.runProjectAct.setWhatsThis(self.trUtf8( |
181 """<b>Run Project</b>""" |
192 """<b>Run Project</b>""" |
182 """<p>Set the command line arguments and run the current project""" |
193 """<p>Set the command line arguments and run the current project""" |
183 """ outside the debugger.""" |
194 """ outside the debugger.""" |
184 """ If files of the current project have unsaved changes they may""" |
195 """ If files of the current project have unsaved changes they""" |
185 """ be saved first.</p>""" |
196 """ may be saved first.</p>""" |
186 )) |
197 )) |
187 self.runProjectAct.triggered[()].connect(self.__runProject) |
198 self.runProjectAct.triggered[()].connect(self.__runProject) |
188 self.actions.append(self.runProjectAct) |
199 self.actions.append(self.runProjectAct) |
189 |
200 |
190 self.coverageAct = E5Action(self.trUtf8('Coverage run of Script'), |
201 self.coverageAct = E5Action(self.trUtf8('Coverage run of Script'), |
191 UI.PixmapCache.getIcon("coverageScript.png"), |
202 UI.PixmapCache.getIcon("coverageScript.png"), |
192 self.trUtf8('Coverage run of Script...'), 0, 0, self, 'dbg_coverage_script') |
203 self.trUtf8('Coverage run of Script...'), 0, 0, self, |
|
204 'dbg_coverage_script') |
193 self.coverageAct.setStatusTip( |
205 self.coverageAct.setStatusTip( |
194 self.trUtf8('Perform a coverage run of the current Script')) |
206 self.trUtf8('Perform a coverage run of the current Script')) |
195 self.coverageAct.setWhatsThis(self.trUtf8( |
207 self.coverageAct.setWhatsThis(self.trUtf8( |
196 """<b>Coverage run of Script</b>""" |
208 """<b>Coverage run of Script</b>""" |
197 """<p>Set the command line arguments and run the script under the control""" |
209 """<p>Set the command line arguments and run the script under""" |
198 """ of a coverage analysis tool. If the file has unsaved changes it may be""" |
210 """ the control of a coverage analysis tool. If the file has""" |
199 """ saved first.</p>""" |
211 """ unsaved changes it may be saved first.</p>""" |
200 )) |
212 )) |
201 self.coverageAct.triggered[()].connect(self.__coverageScript) |
213 self.coverageAct.triggered[()].connect(self.__coverageScript) |
202 self.actions.append(self.coverageAct) |
214 self.actions.append(self.coverageAct) |
203 |
215 |
204 self.coverageProjectAct = E5Action(self.trUtf8('Coverage run of Project'), |
216 self.coverageProjectAct = E5Action( |
205 UI.PixmapCache.getIcon("coverageProject.png"), |
217 self.trUtf8('Coverage run of Project'), |
206 self.trUtf8('Coverage run of Project...'), 0, 0, self, 'dbg_coverage_project') |
218 UI.PixmapCache.getIcon("coverageProject.png"), |
|
219 self.trUtf8('Coverage run of Project...'), 0, 0, self, |
|
220 'dbg_coverage_project') |
207 self.coverageProjectAct.setStatusTip( |
221 self.coverageProjectAct.setStatusTip( |
208 self.trUtf8('Perform a coverage run of the current Project')) |
222 self.trUtf8('Perform a coverage run of the current Project')) |
209 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
223 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
210 """<b>Coverage run of Project</b>""" |
224 """<b>Coverage run of Project</b>""" |
211 """<p>Set the command line arguments and run the current project""" |
225 """<p>Set the command line arguments and run the current project""" |
212 """ under the control of a coverage analysis tool.""" |
226 """ under the control of a coverage analysis tool.""" |
213 """ If files of the current project have unsaved changes they may""" |
227 """ If files of the current project have unsaved changes""" |
214 """ be saved first.</p>""" |
228 """ they may be saved first.</p>""" |
215 )) |
229 )) |
216 self.coverageProjectAct.triggered[()].connect(self.__coverageProject) |
230 self.coverageProjectAct.triggered[()].connect(self.__coverageProject) |
217 self.actions.append(self.coverageProjectAct) |
231 self.actions.append(self.coverageProjectAct) |
218 |
232 |
219 self.profileAct = E5Action(self.trUtf8('Profile Script'), |
233 self.profileAct = E5Action(self.trUtf8('Profile Script'), |
220 UI.PixmapCache.getIcon("profileScript.png"), |
234 UI.PixmapCache.getIcon("profileScript.png"), |
221 self.trUtf8('Profile Script...'), 0, 0, self, 'dbg_profile_script') |
235 self.trUtf8('Profile Script...'), 0, 0, self, 'dbg_profile_script') |
222 self.profileAct.setStatusTip(self.trUtf8('Profile the current Script')) |
236 self.profileAct.setStatusTip(self.trUtf8('Profile the current Script')) |
223 self.profileAct.setWhatsThis(self.trUtf8( |
237 self.profileAct.setWhatsThis(self.trUtf8( |
224 """<b>Profile Script</b>""" |
238 """<b>Profile Script</b>""" |
225 """<p>Set the command line arguments and profile the script.""" |
239 """<p>Set the command line arguments and profile the script.""" |
226 """ If the file has unsaved changes it may be saved first.</p>""" |
240 """ If the file has unsaved changes it may be saved first.</p>""" |
227 )) |
241 )) |
228 self.profileAct.triggered[()].connect(self.__profileScript) |
242 self.profileAct.triggered[()].connect(self.__profileScript) |
229 self.actions.append(self.profileAct) |
243 self.actions.append(self.profileAct) |
230 |
244 |
231 self.profileProjectAct = E5Action(self.trUtf8('Profile Project'), |
245 self.profileProjectAct = E5Action(self.trUtf8('Profile Project'), |
232 UI.PixmapCache.getIcon("profileProject.png"), |
246 UI.PixmapCache.getIcon("profileProject.png"), |
233 self.trUtf8('Profile Project...'), 0, 0, self, 'dbg_profile_project') |
247 self.trUtf8('Profile Project...'), 0, 0, self, |
234 self.profileProjectAct.setStatusTip(self.trUtf8('Profile the current Project')) |
248 'dbg_profile_project') |
|
249 self.profileProjectAct.setStatusTip( |
|
250 self.trUtf8('Profile the current Project')) |
235 self.profileProjectAct.setWhatsThis(self.trUtf8( |
251 self.profileProjectAct.setWhatsThis(self.trUtf8( |
236 """<b>Profile Project</b>""" |
252 """<b>Profile Project</b>""" |
237 """<p>Set the command line arguments and profile the current project.""" |
253 """<p>Set the command line arguments and profile the current""" |
238 """ If files of the current project have unsaved changes they may""" |
254 """ project. If files of the current project have unsaved""" |
239 """ be saved first.</p>""" |
255 """ changes they may be saved first.</p>""" |
240 )) |
256 )) |
241 self.profileProjectAct.triggered[()].connect(self.__profileProject) |
257 self.profileProjectAct.triggered[()].connect(self.__profileProject) |
242 self.actions.append(self.profileProjectAct) |
258 self.actions.append(self.profileProjectAct) |
243 |
259 |
244 self.debugAct = E5Action(self.trUtf8('Debug Script'), |
260 self.debugAct = E5Action(self.trUtf8('Debug Script'), |
245 UI.PixmapCache.getIcon("debugScript.png"), |
261 UI.PixmapCache.getIcon("debugScript.png"), |
246 self.trUtf8('&Debug Script...'), Qt.Key_F5, 0, self, 'dbg_debug_script') |
262 self.trUtf8('&Debug Script...'), Qt.Key_F5, 0, self, |
|
263 'dbg_debug_script') |
247 self.debugAct.setStatusTip(self.trUtf8('Debug the current Script')) |
264 self.debugAct.setStatusTip(self.trUtf8('Debug the current Script')) |
248 self.debugAct.setWhatsThis(self.trUtf8( |
265 self.debugAct.setWhatsThis(self.trUtf8( |
249 """<b>Debug Script</b>""" |
266 """<b>Debug Script</b>""" |
250 """<p>Set the command line arguments and set the current line to be the""" |
267 """<p>Set the command line arguments and set the current line""" |
251 """ first executable Python statement of the current editor window.""" |
268 """ to be the first executable Python statement of the current""" |
252 """ If the file has unsaved changes it may be saved first.</p>""" |
269 """ editor window. If the file has unsaved changes it may be""" |
|
270 """ saved first.</p>""" |
253 )) |
271 )) |
254 self.debugAct.triggered[()].connect(self.__debugScript) |
272 self.debugAct.triggered[()].connect(self.__debugScript) |
255 self.actions.append(self.debugAct) |
273 self.actions.append(self.debugAct) |
256 |
274 |
257 self.debugProjectAct = E5Action(self.trUtf8('Debug Project'), |
275 self.debugProjectAct = E5Action(self.trUtf8('Debug Project'), |
258 UI.PixmapCache.getIcon("debugProject.png"), |
276 UI.PixmapCache.getIcon("debugProject.png"), |
259 self.trUtf8('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, |
277 self.trUtf8('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, |
260 'dbg_debug_project') |
278 'dbg_debug_project') |
261 self.debugProjectAct.setStatusTip(self.trUtf8('Debug the current Project')) |
279 self.debugProjectAct.setStatusTip(self.trUtf8( |
|
280 'Debug the current Project')) |
262 self.debugProjectAct.setWhatsThis(self.trUtf8( |
281 self.debugProjectAct.setWhatsThis(self.trUtf8( |
263 """<b>Debug Project</b>""" |
282 """<b>Debug Project</b>""" |
264 """<p>Set the command line arguments and set the current line to be the""" |
283 """<p>Set the command line arguments and set the current line""" |
265 """ first executable Python statement of the main script of the current""" |
284 """ to be the first executable Python statement of the main""" |
266 """ project. If files of the current project have unsaved changes they may""" |
285 """ script of the current project. If files of the current""" |
267 """ be saved first.</p>""" |
286 """ project have unsaved changes they may be saved first.</p>""" |
268 )) |
287 )) |
269 self.debugProjectAct.triggered[()].connect(self.__debugProject) |
288 self.debugProjectAct.triggered[()].connect(self.__debugProject) |
270 self.actions.append(self.debugProjectAct) |
289 self.actions.append(self.debugProjectAct) |
271 |
290 |
272 self.restartAct = E5Action(self.trUtf8('Restart'), |
291 self.restartAct = E5Action(self.trUtf8('Restart'), |
273 UI.PixmapCache.getIcon("restart.png"), |
292 UI.PixmapCache.getIcon("restart.png"), |
274 self.trUtf8('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') |
293 self.trUtf8('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') |
275 self.restartAct.setStatusTip(self.trUtf8('Restart the last debugged script')) |
294 self.restartAct.setStatusTip(self.trUtf8( |
|
295 'Restart the last debugged script')) |
276 self.restartAct.setWhatsThis(self.trUtf8( |
296 self.restartAct.setWhatsThis(self.trUtf8( |
277 """<b>Restart</b>""" |
297 """<b>Restart</b>""" |
278 """<p>Set the command line arguments and set the current line to be the""" |
298 """<p>Set the command line arguments and set the current line""" |
279 """ first executable Python statement of the script that was debugged last.""" |
299 """ to be the first executable Python statement of the script""" |
280 """ If there are unsaved changes, they may be saved first.</p>""" |
300 """ that was debugged last. If there are unsaved changes, they""" |
|
301 """ may be saved first.</p>""" |
281 )) |
302 )) |
282 self.restartAct.triggered[()].connect(self.__doRestart) |
303 self.restartAct.triggered[()].connect(self.__doRestart) |
283 self.actions.append(self.restartAct) |
304 self.actions.append(self.restartAct) |
284 |
305 |
285 self.stopAct = E5Action(self.trUtf8('Stop'), |
306 self.stopAct = E5Action(self.trUtf8('Stop'), |
286 UI.PixmapCache.getIcon("stopScript.png"), |
307 UI.PixmapCache.getIcon("stopScript.png"), |
287 self.trUtf8('Stop'), Qt.SHIFT + Qt.Key_F10, 0, |
308 self.trUtf8('Stop'), Qt.SHIFT + Qt.Key_F10, 0, |
288 self, 'dbg_stop_script') |
309 self, 'dbg_stop_script') |
289 self.stopAct.setStatusTip(self.trUtf8("""Stop the running script.""")) |
310 self.stopAct.setStatusTip(self.trUtf8("""Stop the running script.""")) |
290 self.stopAct.setWhatsThis(self.trUtf8( |
311 self.stopAct.setWhatsThis(self.trUtf8( |
291 """<b>Stop</b>""" |
312 """<b>Stop</b>""" |
292 """<p>This stops the script running in the debugger backend.</p>""" |
313 """<p>This stops the script running in the debugger backend.</p>""" |
293 )) |
314 )) |
295 self.actions.append(self.stopAct) |
316 self.actions.append(self.stopAct) |
296 |
317 |
297 self.debugActGrp = createActionGroup(self) |
318 self.debugActGrp = createActionGroup(self) |
298 |
319 |
299 act = E5Action(self.trUtf8('Continue'), |
320 act = E5Action(self.trUtf8('Continue'), |
300 UI.PixmapCache.getIcon("continue.png"), |
321 UI.PixmapCache.getIcon("continue.png"), |
301 self.trUtf8('&Continue'), Qt.Key_F6, 0, |
322 self.trUtf8('&Continue'), Qt.Key_F6, 0, |
302 self.debugActGrp, 'dbg_continue') |
323 self.debugActGrp, 'dbg_continue') |
303 act.setStatusTip( |
324 act.setStatusTip( |
304 self.trUtf8('Continue running the program from the current line')) |
325 self.trUtf8('Continue running the program from the current line')) |
305 act.setWhatsThis(self.trUtf8( |
326 act.setWhatsThis(self.trUtf8( |
306 """<b>Continue</b>""" |
327 """<b>Continue</b>""" |
307 """<p>Continue running the program from the current line. The program will""" |
328 """<p>Continue running the program from the current line. The""" |
308 """ stop when it terminates or when a breakpoint is reached.</p>""" |
329 """ program will stop when it terminates or when a breakpoint""" |
|
330 """ is reached.</p>""" |
309 )) |
331 )) |
310 act.triggered[()].connect(self.__continue) |
332 act.triggered[()].connect(self.__continue) |
311 self.actions.append(act) |
333 self.actions.append(act) |
312 |
334 |
313 act = E5Action(self.trUtf8('Continue to Cursor'), |
335 act = E5Action(self.trUtf8('Continue to Cursor'), |
314 UI.PixmapCache.getIcon("continueToCursor.png"), |
336 UI.PixmapCache.getIcon("continueToCursor.png"), |
315 self.trUtf8('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, |
337 self.trUtf8('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, |
316 self.debugActGrp, 'dbg_continue_to_cursor') |
338 self.debugActGrp, 'dbg_continue_to_cursor') |
317 act.setStatusTip(self.trUtf8("""Continue running the program from the""" |
339 act.setStatusTip(self.trUtf8( |
|
340 """Continue running the program from the""" |
318 """ current line to the current cursor position""")) |
341 """ current line to the current cursor position""")) |
319 act.setWhatsThis(self.trUtf8( |
342 act.setWhatsThis(self.trUtf8( |
320 """<b>Continue To Cursor</b>""" |
343 """<b>Continue To Cursor</b>""" |
321 """<p>Continue running the program from the current line to the""" |
344 """<p>Continue running the program from the current line to the""" |
322 """ current cursor position.</p>""" |
345 """ current cursor position.</p>""" |
323 )) |
346 )) |
324 act.triggered[()].connect(self.__runToCursor) |
347 act.triggered[()].connect(self.__runToCursor) |
325 self.actions.append(act) |
348 self.actions.append(act) |
326 |
349 |
327 act = E5Action(self.trUtf8('Single Step'), |
350 act = E5Action(self.trUtf8('Single Step'), |
328 UI.PixmapCache.getIcon("step.png"), |
351 UI.PixmapCache.getIcon("step.png"), |
329 self.trUtf8('Sin&gle Step'), Qt.Key_F7, 0, |
352 self.trUtf8('Sin&gle Step'), Qt.Key_F7, 0, |
330 self.debugActGrp, 'dbg_single_step') |
353 self.debugActGrp, 'dbg_single_step') |
331 act.setStatusTip(self.trUtf8('Execute a single Python statement')) |
354 act.setStatusTip(self.trUtf8('Execute a single Python statement')) |
332 act.setWhatsThis(self.trUtf8( |
355 act.setWhatsThis(self.trUtf8( |
333 """<b>Single Step</b>""" |
356 """<b>Single Step</b>""" |
334 """<p>Execute a single Python statement. If the statement""" |
357 """<p>Execute a single Python statement. If the statement""" |
335 """ is an <tt>import</tt> statement, a class constructor, or a""" |
358 """ is an <tt>import</tt> statement, a class constructor, or a""" |
336 """ method or function call then control is returned to the debugger at""" |
359 """ method or function call then control is returned to the""" |
337 """ the next statement.</p>""" |
360 """ debugger at the next statement.</p>""" |
338 )) |
361 )) |
339 act.triggered[()].connect(self.__step) |
362 act.triggered[()].connect(self.__step) |
340 self.actions.append(act) |
363 self.actions.append(act) |
341 |
364 |
342 act = E5Action(self.trUtf8('Step Over'), |
365 act = E5Action(self.trUtf8('Step Over'), |
343 UI.PixmapCache.getIcon("stepOver.png"), |
366 UI.PixmapCache.getIcon("stepOver.png"), |
344 self.trUtf8('Step &Over'), Qt.Key_F8, 0, |
367 self.trUtf8('Step &Over'), Qt.Key_F8, 0, |
345 self.debugActGrp, 'dbg_step_over') |
368 self.debugActGrp, 'dbg_step_over') |
346 act.setStatusTip(self.trUtf8("""Execute a single Python statement staying""" |
369 act.setStatusTip(self.trUtf8( |
|
370 """Execute a single Python statement staying""" |
347 """ in the current frame""")) |
371 """ in the current frame""")) |
348 act.setWhatsThis(self.trUtf8( |
372 act.setWhatsThis(self.trUtf8( |
349 """<b>Step Over</b>""" |
373 """<b>Step Over</b>""" |
350 """<p>Execute a single Python statement staying in the same frame. If""" |
374 """<p>Execute a single Python statement staying in the same""" |
351 """ the statement is an <tt>import</tt> statement, a class constructor,""" |
375 """ frame. If the statement is an <tt>import</tt> statement,""" |
352 """ or a method or function call then control is returned to the debugger""" |
376 """ a class constructor, or a method or function call then""" |
353 """ after the statement has completed.</p>""" |
377 """ control is returned to the debugger after the statement""" |
|
378 """ has completed.</p>""" |
354 )) |
379 )) |
355 act.triggered[()].connect(self.__stepOver) |
380 act.triggered[()].connect(self.__stepOver) |
356 self.actions.append(act) |
381 self.actions.append(act) |
357 |
382 |
358 act = E5Action(self.trUtf8('Step Out'), |
383 act = E5Action(self.trUtf8('Step Out'), |
359 UI.PixmapCache.getIcon("stepOut.png"), |
384 UI.PixmapCache.getIcon("stepOut.png"), |
360 self.trUtf8('Step Ou&t'), Qt.Key_F9, 0, |
385 self.trUtf8('Step Ou&t'), Qt.Key_F9, 0, |
361 self.debugActGrp, 'dbg_step_out') |
386 self.debugActGrp, 'dbg_step_out') |
362 act.setStatusTip(self.trUtf8("""Execute Python statements until leaving""" |
387 act.setStatusTip(self.trUtf8( |
|
388 """Execute Python statements until leaving""" |
363 """ the current frame""")) |
389 """ the current frame""")) |
364 act.setWhatsThis(self.trUtf8( |
390 act.setWhatsThis(self.trUtf8( |
365 """<b>Step Out</b>""" |
391 """<b>Step Out</b>""" |
366 """<p>Execute Python statements until leaving the current frame. If""" |
392 """<p>Execute Python statements until leaving the current""" |
367 """ the statements are inside an <tt>import</tt> statement, a class""" |
393 """ frame. If the statements are inside an <tt>import</tt>""" |
368 """ constructor, or a method or function call then control is returned""" |
394 """ statement, a class constructor, or a method or function""" |
369 """ to the debugger after the current frame has been left.</p>""" |
395 """ call then control is returned to the debugger after the""" |
|
396 """ current frame has been left.</p>""" |
370 )) |
397 )) |
371 act.triggered[()].connect(self.__stepOut) |
398 act.triggered[()].connect(self.__stepOut) |
372 self.actions.append(act) |
399 self.actions.append(act) |
373 |
400 |
374 act = E5Action(self.trUtf8('Stop'), |
401 act = E5Action(self.trUtf8('Stop'), |
375 UI.PixmapCache.getIcon("stepQuit.png"), |
402 UI.PixmapCache.getIcon("stepQuit.png"), |
376 self.trUtf8('&Stop'), Qt.Key_F10, 0, |
403 self.trUtf8('&Stop'), Qt.Key_F10, 0, |
377 self.debugActGrp, 'dbg_stop') |
404 self.debugActGrp, 'dbg_stop') |
378 act.setStatusTip(self.trUtf8('Stop debugging')) |
405 act.setStatusTip(self.trUtf8('Stop debugging')) |
379 act.setWhatsThis(self.trUtf8( |
406 act.setWhatsThis(self.trUtf8( |
380 """<b>Stop</b>""" |
407 """<b>Stop</b>""" |
381 """<p>Stop the running debugging session.</p>""" |
408 """<p>Stop the running debugging session.</p>""" |
382 )) |
409 )) |
410 )) |
437 )) |
411 act.triggered[()].connect(self.__exec) |
438 act.triggered[()].connect(self.__exec) |
412 self.actions.append(act) |
439 self.actions.append(act) |
413 |
440 |
414 self.dbgFilterAct = E5Action(self.trUtf8('Variables Type Filter'), |
441 self.dbgFilterAct = E5Action(self.trUtf8('Variables Type Filter'), |
415 self.trUtf8('Varia&bles Type Filter...'), 0, 0, self, |
442 self.trUtf8('Varia&bles Type Filter...'), 0, 0, self, |
416 'dbg_variables_filter') |
443 'dbg_variables_filter') |
417 self.dbgFilterAct.setStatusTip(self.trUtf8('Configure variables type filter')) |
444 self.dbgFilterAct.setStatusTip(self.trUtf8( |
|
445 'Configure variables type filter')) |
418 self.dbgFilterAct.setWhatsThis(self.trUtf8( |
446 self.dbgFilterAct.setWhatsThis(self.trUtf8( |
419 """<b>Variables Type Filter</b>""" |
447 """<b>Variables Type Filter</b>""" |
420 """<p>Configure the variables type filter. Only variable types that are not""" |
448 """<p>Configure the variables type filter. Only variable types""" |
421 """ selected are displayed in the global or local variables window""" |
449 """ that are not selected are displayed in the global or local""" |
422 """ during a debugging session.</p>""" |
450 """ variables window during a debugging session.</p>""" |
423 )) |
451 )) |
424 self.dbgFilterAct.triggered[()].connect(self.__configureVariablesFilters) |
452 self.dbgFilterAct.triggered[()].connect( |
|
453 self.__configureVariablesFilters) |
425 self.actions.append(self.dbgFilterAct) |
454 self.actions.append(self.dbgFilterAct) |
426 |
455 |
427 self.excFilterAct = E5Action(self.trUtf8('Exceptions Filter'), |
456 self.excFilterAct = E5Action(self.trUtf8('Exceptions Filter'), |
428 self.trUtf8('&Exceptions Filter...'), 0, 0, self, 'dbg_exceptions_filter') |
457 self.trUtf8('&Exceptions Filter...'), 0, 0, self, |
429 self.excFilterAct.setStatusTip(self.trUtf8('Configure exceptions filter')) |
458 'dbg_exceptions_filter') |
|
459 self.excFilterAct.setStatusTip(self.trUtf8( |
|
460 'Configure exceptions filter')) |
430 self.excFilterAct.setWhatsThis(self.trUtf8( |
461 self.excFilterAct.setWhatsThis(self.trUtf8( |
431 """<b>Exceptions Filter</b>""" |
462 """<b>Exceptions Filter</b>""" |
432 """<p>Configure the exceptions filter. Only exception types that are""" |
463 """<p>Configure the exceptions filter. Only exception types""" |
433 """ listed are highlighted during a debugging session.</p>""" |
464 """ that are listed are highlighted during a debugging""" |
434 """<p>Please note, that all unhandled exceptions are highlighted""" |
465 """ session.</p><p>Please note, that all unhandled exceptions""" |
435 """ indepent from the filter list.</p>""" |
466 """ are highlighted indepent from the filter list.</p>""" |
436 )) |
467 )) |
437 self.excFilterAct.triggered[()].connect(self.__configureExceptionsFilter) |
468 self.excFilterAct.triggered[()].connect( |
|
469 self.__configureExceptionsFilter) |
438 self.actions.append(self.excFilterAct) |
470 self.actions.append(self.excFilterAct) |
439 |
471 |
440 self.excIgnoreFilterAct = E5Action(self.trUtf8('Ignored Exceptions'), |
472 self.excIgnoreFilterAct = E5Action(self.trUtf8('Ignored Exceptions'), |
441 self.trUtf8('&Ignored Exceptions...'), 0, 0, |
473 self.trUtf8('&Ignored Exceptions...'), 0, 0, |
442 self, 'dbg_ignored_exceptions') |
474 self, 'dbg_ignored_exceptions') |
443 self.excIgnoreFilterAct.setStatusTip(self.trUtf8('Configure ignored exceptions')) |
475 self.excIgnoreFilterAct.setStatusTip(self.trUtf8( |
|
476 'Configure ignored exceptions')) |
444 self.excIgnoreFilterAct.setWhatsThis(self.trUtf8( |
477 self.excIgnoreFilterAct.setWhatsThis(self.trUtf8( |
445 """<b>Ignored Exceptions</b>""" |
478 """<b>Ignored Exceptions</b>""" |
446 """<p>Configure the ignored exceptions. Only exception types that are""" |
479 """<p>Configure the ignored exceptions. Only exception types""" |
447 """ not listed are highlighted during a debugging session.</p>""" |
480 """ that are not listed are highlighted during a debugging""" |
448 """<p>Please note, that unhandled exceptions cannot be ignored.</p>""" |
481 """ session.</p><p>Please note, that unhandled exceptions""" |
449 )) |
482 """ cannot be ignored.</p>""" |
450 self.excIgnoreFilterAct.triggered[()].connect(self.__configureIgnoredExceptions) |
483 )) |
|
484 self.excIgnoreFilterAct.triggered[()].connect( |
|
485 self.__configureIgnoredExceptions) |
451 self.actions.append(self.excIgnoreFilterAct) |
486 self.actions.append(self.excIgnoreFilterAct) |
452 |
487 |
453 self.dbgSetBpActGrp = createActionGroup(self) |
488 self.dbgSetBpActGrp = createActionGroup(self) |
454 |
489 |
455 self.dbgToggleBpAct = E5Action(self.trUtf8('Toggle Breakpoint'), |
490 self.dbgToggleBpAct = E5Action(self.trUtf8('Toggle Breakpoint'), |
456 UI.PixmapCache.getIcon("breakpointToggle.png"), |
491 UI.PixmapCache.getIcon("breakpointToggle.png"), |
457 self.trUtf8('Toggle Breakpoint'), |
492 self.trUtf8('Toggle Breakpoint'), |
458 QKeySequence(self.trUtf8("Shift+F11", "Debug|Toggle Breakpoint")), 0, |
493 QKeySequence(self.trUtf8("Shift+F11", "Debug|Toggle Breakpoint")), |
459 self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') |
494 0, self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') |
460 self.dbgToggleBpAct.setStatusTip(self.trUtf8('Toggle Breakpoint')) |
495 self.dbgToggleBpAct.setStatusTip(self.trUtf8('Toggle Breakpoint')) |
461 self.dbgToggleBpAct.setWhatsThis(self.trUtf8( |
496 self.dbgToggleBpAct.setWhatsThis(self.trUtf8( |
462 """<b>Toggle Breakpoint</b>""" |
497 """<b>Toggle Breakpoint</b>""" |
463 """<p>Toggles a breakpoint at the current line of the""" |
498 """<p>Toggles a breakpoint at the current line of the""" |
464 """ current editor.</p>""" |
499 """ current editor.</p>""" |
465 )) |
500 )) |
466 self.dbgToggleBpAct.triggered[()].connect(self.__toggleBreakpoint) |
501 self.dbgToggleBpAct.triggered[()].connect(self.__toggleBreakpoint) |
467 self.actions.append(self.dbgToggleBpAct) |
502 self.actions.append(self.dbgToggleBpAct) |
468 |
503 |
469 self.dbgEditBpAct = E5Action(self.trUtf8('Edit Breakpoint'), |
504 self.dbgEditBpAct = E5Action(self.trUtf8('Edit Breakpoint'), |
470 UI.PixmapCache.getIcon("cBreakpointToggle.png"), |
505 UI.PixmapCache.getIcon("cBreakpointToggle.png"), |
471 self.trUtf8('Edit Breakpoint...'), |
506 self.trUtf8('Edit Breakpoint...'), |
472 QKeySequence(self.trUtf8("Shift+F12", "Debug|Edit Breakpoint")), 0, |
507 QKeySequence(self.trUtf8("Shift+F12", "Debug|Edit Breakpoint")), 0, |
473 self.dbgSetBpActGrp, 'dbg_edit_breakpoint') |
508 self.dbgSetBpActGrp, 'dbg_edit_breakpoint') |
474 self.dbgEditBpAct.setStatusTip(self.trUtf8('Edit Breakpoint')) |
509 self.dbgEditBpAct.setStatusTip(self.trUtf8('Edit Breakpoint')) |
475 self.dbgEditBpAct.setWhatsThis(self.trUtf8( |
510 self.dbgEditBpAct.setWhatsThis(self.trUtf8( |
476 """<b>Edit Breakpoint</b>""" |
511 """<b>Edit Breakpoint</b>""" |
477 """<p>Opens a dialog to edit the breakpoints properties.""" |
512 """<p>Opens a dialog to edit the breakpoints properties.""" |
478 """ It works at the current line of the current editor.</p>""" |
513 """ It works at the current line of the current editor.</p>""" |
479 )) |
514 )) |
480 self.dbgEditBpAct.triggered[()].connect(self.__editBreakpoint) |
515 self.dbgEditBpAct.triggered[()].connect(self.__editBreakpoint) |
481 self.actions.append(self.dbgEditBpAct) |
516 self.actions.append(self.dbgEditBpAct) |
482 |
517 |
483 self.dbgNextBpAct = E5Action(self.trUtf8('Next Breakpoint'), |
518 self.dbgNextBpAct = E5Action(self.trUtf8('Next Breakpoint'), |
484 UI.PixmapCache.getIcon("breakpointNext.png"), |
519 UI.PixmapCache.getIcon("breakpointNext.png"), |
485 self.trUtf8('Next Breakpoint'), |
520 self.trUtf8('Next Breakpoint'), |
486 QKeySequence(self.trUtf8("Ctrl+Shift+PgDown", "Debug|Next Breakpoint")), 0, |
521 QKeySequence( |
487 self.dbgSetBpActGrp, 'dbg_next_breakpoint') |
522 self.trUtf8("Ctrl+Shift+PgDown", "Debug|Next Breakpoint")), 0, |
|
523 self.dbgSetBpActGrp, 'dbg_next_breakpoint') |
488 self.dbgNextBpAct.setStatusTip(self.trUtf8('Next Breakpoint')) |
524 self.dbgNextBpAct.setStatusTip(self.trUtf8('Next Breakpoint')) |
489 self.dbgNextBpAct.setWhatsThis(self.trUtf8( |
525 self.dbgNextBpAct.setWhatsThis(self.trUtf8( |
490 """<b>Next Breakpoint</b>""" |
526 """<b>Next Breakpoint</b>""" |
491 """<p>Go to next breakpoint of the current editor.</p>""" |
527 """<p>Go to next breakpoint of the current editor.</p>""" |
492 )) |
528 )) |
493 self.dbgNextBpAct.triggered[()].connect(self.__nextBreakpoint) |
529 self.dbgNextBpAct.triggered[()].connect(self.__nextBreakpoint) |
494 self.actions.append(self.dbgNextBpAct) |
530 self.actions.append(self.dbgNextBpAct) |
495 |
531 |
496 self.dbgPrevBpAct = E5Action(self.trUtf8('Previous Breakpoint'), |
532 self.dbgPrevBpAct = E5Action(self.trUtf8('Previous Breakpoint'), |
497 UI.PixmapCache.getIcon("breakpointPrevious.png"), |
533 UI.PixmapCache.getIcon("breakpointPrevious.png"), |
498 self.trUtf8('Previous Breakpoint'), |
534 self.trUtf8('Previous Breakpoint'), |
499 QKeySequence(self.trUtf8("Ctrl+Shift+PgUp", "Debug|Previous Breakpoint")), |
535 QKeySequence( |
500 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') |
536 self.trUtf8("Ctrl+Shift+PgUp", "Debug|Previous Breakpoint")), |
|
537 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') |
501 self.dbgPrevBpAct.setStatusTip(self.trUtf8('Previous Breakpoint')) |
538 self.dbgPrevBpAct.setStatusTip(self.trUtf8('Previous Breakpoint')) |
502 self.dbgPrevBpAct.setWhatsThis(self.trUtf8( |
539 self.dbgPrevBpAct.setWhatsThis(self.trUtf8( |
503 """<b>Previous Breakpoint</b>""" |
540 """<b>Previous Breakpoint</b>""" |
504 """<p>Go to previous breakpoint of the current editor.</p>""" |
541 """<p>Go to previous breakpoint of the current editor.</p>""" |
505 )) |
542 )) |
506 self.dbgPrevBpAct.triggered[()].connect(self.__previousBreakpoint) |
543 self.dbgPrevBpAct.triggered[()].connect(self.__previousBreakpoint) |
507 self.actions.append(self.dbgPrevBpAct) |
544 self.actions.append(self.dbgPrevBpAct) |
508 |
545 |
509 act = E5Action(self.trUtf8('Clear Breakpoints'), |
546 act = E5Action(self.trUtf8('Clear Breakpoints'), |
510 self.trUtf8('Clear Breakpoints'), |
547 self.trUtf8('Clear Breakpoints'), |
511 QKeySequence(self.trUtf8("Ctrl+Shift+C", "Debug|Clear Breakpoints")), 0, |
548 QKeySequence( |
512 self.dbgSetBpActGrp, 'dbg_clear_breakpoint') |
549 self.trUtf8("Ctrl+Shift+C", "Debug|Clear Breakpoints")), 0, |
|
550 self.dbgSetBpActGrp, 'dbg_clear_breakpoint') |
513 act.setStatusTip(self.trUtf8('Clear Breakpoints')) |
551 act.setStatusTip(self.trUtf8('Clear Breakpoints')) |
514 act.setWhatsThis(self.trUtf8( |
552 act.setWhatsThis(self.trUtf8( |
515 """<b>Clear Breakpoints</b>""" |
553 """<b>Clear Breakpoints</b>""" |
516 """<p>Clear breakpoints of all editors.</p>""" |
554 """<p>Clear breakpoints of all editors.</p>""" |
517 )) |
555 )) |
949 ' status of {0}.</p>').format(status)) |
989 ' status of {0}.</p>').format(status)) |
950 else: |
990 else: |
951 E5MessageBox.information(self.ui, Program, |
991 E5MessageBox.information(self.ui, Program, |
952 self.trUtf8('<p><b>{0}</b> has terminated with an exit' |
992 self.trUtf8('<p><b>{0}</b> has terminated with an exit' |
953 ' status of {1}.</p>') |
993 ' status of {1}.</p>') |
954 .format(Utilities.normabspath(self.ui.currentProg), status)) |
994 .format(Utilities.normabspath(self.ui.currentProg), |
|
995 status)) |
955 else: |
996 else: |
956 if self.ui.notificationsEnabled(): |
997 if self.ui.notificationsEnabled(): |
957 if self.ui.currentProg is None: |
998 if self.ui.currentProg is None: |
958 msg = self.trUtf8('The program has terminated with an exit' |
999 msg = self.trUtf8('The program has terminated with an exit' |
959 ' status of {0}.').format(status) |
1000 ' status of {0}.').format(status) |
960 else: |
1001 else: |
961 msg = self.trUtf8('"{0}" has terminated with an exit' |
1002 msg = self.trUtf8('"{0}" has terminated with an exit' |
962 ' status of {1}.')\ |
1003 ' status of {1}.')\ |
963 .format(os.path.basename(self.ui.currentProg), status) |
1004 .format(os.path.basename(self.ui.currentProg), |
964 self.ui.showNotification(UI.PixmapCache.getPixmap("debug48.png"), |
1005 status) |
|
1006 self.ui.showNotification( |
|
1007 UI.PixmapCache.getPixmap("debug48.png"), |
965 self.trUtf8("Program terminated"), msg) |
1008 self.trUtf8("Program terminated"), msg) |
966 else: |
1009 else: |
967 if self.ui.currentProg is None: |
1010 if self.ui.currentProg is None: |
968 self.appendStdout.emit( |
1011 self.appendStdout.emit( |
969 self.trUtf8('The program has terminated with an exit' |
1012 self.trUtf8('The program has terminated with an exit' |
970 ' status of {0}.\n').format(status)) |
1013 ' status of {0}.\n').format(status)) |
971 else: |
1014 else: |
972 self.appendStdout.emit( |
1015 self.appendStdout.emit( |
973 self.trUtf8('"{0}" has terminated with an exit' |
1016 self.trUtf8('"{0}" has terminated with an exit' |
974 ' status of {1}.\n') |
1017 ' status of {1}.\n') |
975 .format(Utilities.normabspath(self.ui.currentProg), status)) |
1018 .format(Utilities.normabspath(self.ui.currentProg), |
|
1019 status)) |
976 |
1020 |
977 def __clientSyntaxError(self, message, filename, lineNo, characterNo): |
1021 def __clientSyntaxError(self, message, filename, lineNo, characterNo): |
978 """ |
1022 """ |
979 Private method to handle a syntax error in the debugged program. |
1023 Private method to handle a syntax error in the debugged program. |
980 |
1024 |
981 @param message message of the syntax error (string) |
1025 @param message message of the syntax error (string) |
982 @param filename translated filename of the syntax error position (string) |
1026 @param filename translated filename of the syntax error position |
|
1027 (string) |
983 @param lineNo line number of the syntax error position (integer) |
1028 @param lineNo line number of the syntax error position (integer) |
984 @param characterNo character number of the syntax error position (integer) |
1029 @param characterNo character number of the syntax error position |
|
1030 (integer) |
985 """ |
1031 """ |
986 self.__resetUI() |
1032 self.__resetUI() |
987 self.ui.raise_() |
1033 self.ui.raise_() |
988 self.ui.activateWindow() |
1034 self.ui.activateWindow() |
989 |
1035 |
990 if message is None: |
1036 if message is None: |
991 E5MessageBox.critical(self.ui, Program, |
1037 E5MessageBox.critical(self.ui, Program, |
992 self.trUtf8('The program being debugged contains an unspecified' |
1038 self.trUtf8( |
993 ' syntax error.')) |
1039 'The program being debugged contains an unspecified' |
|
1040 ' syntax error.')) |
994 return |
1041 return |
995 |
1042 |
996 if not os.path.isabs(filename): |
1043 if not os.path.isabs(filename): |
997 if os.path.exists(os.path.join(self.project.getProjectPath(), filename)): |
1044 if os.path.exists(os.path.join(self.project.getProjectPath(), |
998 filename = os.path.join(self.project.getProjectPath(), filename) |
1045 filename)): |
|
1046 filename = os.path.join(self.project.getProjectPath(), |
|
1047 filename) |
999 else: |
1048 else: |
1000 d = os.path.dirname(self.project.getMainScript(normalized=True)) |
1049 d = os.path.dirname( |
|
1050 self.project.getMainScript(normalized=True)) |
1001 if os.path.exists(os.path.join(d, filename)): |
1051 if os.path.exists(os.path.join(d, filename)): |
1002 filename = os.path.join(d, filename) |
1052 filename = os.path.join(d, filename) |
1003 self.viewmanager.setFileLine(filename, lineNo, True, True) |
1053 self.viewmanager.setFileLine(filename, lineNo, True, True) |
1004 E5MessageBox.critical(self.ui, Program, |
1054 E5MessageBox.critical(self.ui, Program, |
1005 self.trUtf8('<p>The file <b>{0}</b> contains the syntax error' |
1055 self.trUtf8('<p>The file <b>{0}</b> contains the syntax error' |
1006 ' <b>{1}</b> at line <b>{2}</b>, character <b>{3}</b>.</p>') |
1056 ' <b>{1}</b> at line <b>{2}</b>, character <b>{3}</b>.' |
|
1057 '</p>') |
1007 .format(filename, message, lineNo, characterNo)) |
1058 .format(filename, message, lineNo, characterNo)) |
1008 |
1059 |
1009 def __clientException(self, exceptionType, exceptionMessage, stackTrace): |
1060 def __clientException(self, exceptionType, exceptionMessage, stackTrace): |
1010 """ |
1061 """ |
1011 Private method to handle an exception of the debugged program. |
1062 Private method to handle an exception of the debugged program. |
1870 enableCallTrace = self.debugViewer.isCallTraceEnabled() |
1949 enableCallTrace = self.debugViewer.isCallTraceEnabled() |
1871 self.debugViewer.clearCallTrace() |
1950 self.debugViewer.clearCallTrace() |
1872 self.debugViewer.setCallTraceToProjectMode(forProject) |
1951 self.debugViewer.setCallTraceToProjectMode(forProject) |
1873 |
1952 |
1874 # Ask the client to debug the new program. |
1953 # Ask the client to debug the new program. |
1875 self.debugServer.remoteLoad(fn, argv, wd, env, |
1954 self.debugServer.remoteLoad( |
1876 autoClearShell=self.autoClearShell, tracePython=self.tracePython, |
1955 fn, argv, wd, env, |
1877 autoContinue=self.autoContinue, forProject=forProject, |
1956 autoClearShell=self.autoClearShell, |
1878 runInConsole=self.runInConsole, autoFork=self.forkAutomatically, |
1957 tracePython=self.tracePython, |
1879 forkChild=self.forkIntoChild, clientType=self.clientType, |
1958 autoContinue=self.autoContinue, |
|
1959 forProject=forProject, |
|
1960 runInConsole=self.runInConsole, |
|
1961 autoFork=self.forkAutomatically, |
|
1962 forkChild=self.forkIntoChild, |
|
1963 clientType=self.clientType, |
1880 enableCallTrace=enableCallTrace) |
1964 enableCallTrace=enableCallTrace) |
1881 |
1965 |
1882 # Signal that we have started a debugging session |
1966 # Signal that we have started a debugging session |
1883 self.debuggingStarted.emit(fn) |
1967 self.debuggingStarted.emit(fn) |
1884 |
1968 |
1885 elif self.lastStartAction in [3, 4]: |
1969 elif self.lastStartAction in [3, 4]: |
1886 # Ask the client to run the new program. |
1970 # Ask the client to run the new program. |
1887 self.debugServer.remoteRun(fn, argv, wd, env, |
1971 self.debugServer.remoteRun( |
1888 autoClearShell=self.autoClearShell, forProject=forProject, |
1972 fn, argv, wd, env, |
1889 runInConsole=self.runInConsole, autoFork=self.forkAutomatically, |
1973 autoClearShell=self.autoClearShell, |
1890 forkChild=self.forkIntoChild, clientType=self.clientType) |
1974 forProject=forProject, |
|
1975 runInConsole=self.runInConsole, |
|
1976 autoFork=self.forkAutomatically, |
|
1977 forkChild=self.forkIntoChild, |
|
1978 clientType=self.clientType) |
1891 |
1979 |
1892 elif self.lastStartAction in [5, 6]: |
1980 elif self.lastStartAction in [5, 6]: |
1893 # Ask the client to coverage run the new program. |
1981 # Ask the client to coverage run the new program. |
1894 self.debugServer.remoteCoverage(fn, argv, wd, env, |
1982 self.debugServer.remoteCoverage( |
1895 autoClearShell=self.autoClearShell, erase=self.eraseCoverage, |
1983 fn, argv, wd, env, |
1896 forProject=forProject, runInConsole=self.runInConsole, |
1984 autoClearShell=self.autoClearShell, |
|
1985 erase=self.eraseCoverage, |
|
1986 forProject=forProject, |
|
1987 runInConsole=self.runInConsole, |
1897 clientType=self.clientType) |
1988 clientType=self.clientType) |
1898 |
1989 |
1899 elif self.lastStartAction in [7, 8]: |
1990 elif self.lastStartAction in [7, 8]: |
1900 # Ask the client to profile run the new program. |
1991 # Ask the client to profile run the new program. |
1901 self.debugServer.remoteProfile(fn, argv, wd, env, |
1992 self.debugServer.remoteProfile( |
1902 autoClearShell=self.autoClearShell, erase=self.eraseTimings, |
1993 fn, argv, wd, env, |
1903 forProject=forProject, runInConsole=self.runInConsole, |
1994 autoClearShell=self.autoClearShell, |
|
1995 erase=self.eraseTimings, |
|
1996 forProject=forProject, |
|
1997 runInConsole=self.runInConsole, |
1904 clientType=self.clientType) |
1998 clientType=self.clientType) |
1905 |
1999 |
1906 self.stopAct.setEnabled(True) |
2000 self.stopAct.setEnabled(True) |
1907 |
2001 |
1908 def __stopScript(self): |
2002 def __stopScript(self): |