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