--- a/eric6/Debugger/DebugUI.py Fri Dec 18 17:01:10 2020 +0100 +++ b/eric6/Debugger/DebugUI.py Sat Dec 19 14:41:43 2020 +0100 @@ -115,7 +115,8 @@ self.lastAction = -1 self.debugActions = [ self.__continue, self.__step, self.__stepOver, self.__stepOut, - self.__stepQuit, self.__runToCursor, self.__moveInstructionPointer + self.__stepQuit, self.__runToCursor, self.__runUntil, + self.__moveInstructionPointer ] self.__localsVarFilterList, self.__globalsVarFilterList = ( Preferences.getVarFilters()) @@ -377,6 +378,23 @@ self.actions.append(act) act = E5Action( + self.tr('Continue Until'), + UI.PixmapCache.getIcon("continueUntil"), + self.tr('Continue &Until'), Qt.SHIFT + Qt.Key_F6, 0, + self.debugActGrp, 'dbg_continue_until') + act.setStatusTip(self.tr( + """Continue running the program from the current line to the""" + """ current cursor position or until leaving the current frame""")) + act.setWhatsThis(self.tr( + """<b>Continue Until</b>""" + """<p>Continue running the program from the current line to the""" + """ cursor position greater than the current line or until""" + """ leaving the current frame.</p>""" + )) + act.triggered.connect(self.__runUntil) + self.actions.append(act) + + act = E5Action( self.tr('Move Instruction Pointer to Cursor'), UI.PixmapCache.getIcon("moveInstructionPointer"), self.tr('&Jump To Cursor'), Qt.Key_F12, 0, @@ -2425,6 +2443,22 @@ aw.getFileName(), line, 1, None, 1) self.debugServer.remoteContinue(debuggerId) + def __runUntil(self, debuggerId=""): + """ + Private method to handle the Run Until action. + + @param debuggerId ID of the debugger backend + @type str + """ + if not debuggerId: + debuggerId = self.getSelectedDebuggerId() + + self.lastAction = 0 + aw = self.viewmanager.activeWindow() + line = aw.getCursorPosition()[0] + 1 + self.__enterRemote() + self.debugServer.remoteContinueUntil(debuggerId, line) + def __moveInstructionPointer(self, debuggerId=""): """ Private method to move the instruction pointer to a different line.