107 self.lastStartAction = 0 # 0=None, 1=Script, 2=Project |
107 self.lastStartAction = 0 # 0=None, 1=Script, 2=Project |
108 self.clientType = "" |
108 self.clientType = "" |
109 self.lastAction = -1 |
109 self.lastAction = -1 |
110 self.debugActions = [ |
110 self.debugActions = [ |
111 self.__continue, self.__step, self.__stepOver, self.__stepOut, |
111 self.__continue, self.__step, self.__stepOver, self.__stepOut, |
112 self.__stepQuit, self.__runToCursor |
112 self.__stepQuit, self.__runToCursor, self.__moveInstructionPointer |
113 ] |
113 ] |
114 self.localsVarFilter, self.globalsVarFilter = \ |
114 self.localsVarFilter, self.globalsVarFilter = \ |
115 Preferences.getVarFilters() |
115 Preferences.getVarFilters() |
116 self.debugViewer.setVariablesFilter( |
116 self.debugViewer.setVariablesFilter( |
117 self.globalsVarFilter, self.localsVarFilter) |
117 self.globalsVarFilter, self.localsVarFilter) |
354 """<b>Continue To Cursor</b>""" |
354 """<b>Continue To Cursor</b>""" |
355 """<p>Continue running the program from the current line to the""" |
355 """<p>Continue running the program from the current line to the""" |
356 """ current cursor position.</p>""" |
356 """ current cursor position.</p>""" |
357 )) |
357 )) |
358 act.triggered.connect(self.__runToCursor) |
358 act.triggered.connect(self.__runToCursor) |
|
359 self.actions.append(act) |
|
360 |
|
361 act = E5Action( |
|
362 self.tr('Move Instruction Pointer to Cursor'), |
|
363 UI.PixmapCache.getIcon("moveInstructionPointer.png"), |
|
364 self.tr('&Jump To Cursor'), Qt.Key_F12, 0, |
|
365 self.debugActGrp, 'dbg_jump_to_cursor') |
|
366 act.setStatusTip(self.tr( |
|
367 """Skip the code from the""" |
|
368 """ current line to the current cursor position""")) |
|
369 act.setWhatsThis(self.tr( |
|
370 """<b>Move Instruction Pointer to Cursor</b>""" |
|
371 """<p>Move the Python internal instruction pointer to the""" |
|
372 """ current cursor position without executing the code in""" |
|
373 """ between.</p>""" |
|
374 """<p>It's not possible to jump out of a function or jump""" |
|
375 """ in a code block, e.g. a loop. In these cases, a error""" |
|
376 """ message is printed to the log window.<p>""" |
|
377 )) |
|
378 act.triggered.connect(self.__moveInstructionPointer) |
359 self.actions.append(act) |
379 self.actions.append(act) |
360 |
380 |
361 act = E5Action( |
381 act = E5Action( |
362 self.tr('Single Step'), |
382 self.tr('Single Step'), |
363 UI.PixmapCache.getIcon("step.png"), |
383 UI.PixmapCache.getIcon("step.png"), |
2213 line = aw.getCursorPosition()[0] + 1 |
2233 line = aw.getCursorPosition()[0] + 1 |
2214 self.__enterRemote() |
2234 self.__enterRemote() |
2215 self.debugServer.remoteBreakpoint( |
2235 self.debugServer.remoteBreakpoint( |
2216 aw.getFileName(), line, 1, None, 1) |
2236 aw.getFileName(), line, 1, None, 1) |
2217 self.debugServer.remoteContinue() |
2237 self.debugServer.remoteContinue() |
2218 |
2238 |
|
2239 def __moveInstructionPointer(self): |
|
2240 """ |
|
2241 Private method to move the instruction pointer to a different line. |
|
2242 """ |
|
2243 self.lastAction = 0 |
|
2244 aw = self.viewmanager.activeWindow() |
|
2245 line = aw.getCursorPosition()[0] + 1 |
|
2246 self.debugServer.remoteMoveIP(line) |
|
2247 |
2219 def __enterRemote(self): |
2248 def __enterRemote(self): |
2220 """ |
2249 """ |
2221 Private method to update the user interface. |
2250 Private method to update the user interface. |
2222 |
2251 |
2223 This method is called just prior to executing some of |
2252 This method is called just prior to executing some of |