diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index be8476b00..a5acb1a4d 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -6237,8 +6237,9 @@ SUB DebugMode IdeDebugMode = 1 GOTO requestPause CASE 8 - 'IdeDebugMode = 1 - 'GOTO requestPause + IdeDebugMode = 1 + result = idecy + GOTO requestRunToThisLine CASE 9 IdeDebugMode = 1 GOTO requestQuit @@ -6747,12 +6748,28 @@ SUB DebugMode GOSUB UpdateDisplay CASE 103, 71 'g, G IF _KEYDOWN(100306) OR _KEYDOWN(100305) THEN - result = idegetlinenumberbox("Set Next Line") - PCOPY 3, 0: SCREEN , , 3, 0 - requestSetNextLine: - IF result > 0 AND result < iden THEN - cmd$ = "set next line:" + MKL$(result) - GOSUB SendCommand + IF _KEYDOWN(100304) OR _KEYDOWN(100303) THEN + result = idegetlinenumberbox("Run To Line") + PCOPY 3, 0: SCREEN , , 3, 0 + requestRunToThisLine: + IF result > 0 AND result < iden THEN + PauseMode = 0 + debugnextline = 0 + cmd$ = "run to line:" + MKL$(result) + GOSUB SendCommand + clearStatusWindow 1 + setStatusMessage 1, "Running...", 10 + GOSUB UpdateDisplay + dummy = DarkenFGBG(1) + END IF + ELSE + result = idegetlinenumberbox("Set Next Line") + PCOPY 3, 0: SCREEN , , 3, 0 + requestSetNextLine: + IF result > 0 AND result < iden THEN + cmd$ = "set next line:" + MKL$(result) + GOSUB SendCommand + END IF END IF END IF CASE 112, 80 'p, P diff --git a/source/utilities/vwatch/vwatch.bm b/source/utilities/vwatch/vwatch.bm index d8b64b6c7..4e2fbfd35 100644 --- a/source/utilities/vwatch/vwatch.bm +++ b/source/utilities/vwatch/vwatch.bm @@ -2,7 +2,7 @@ $CHECKING:OFF SUB vwatch (localVariables AS _OFFSET) STATIC AS LONG ideHost, breakpointCount, skipCount, timeout, startLevel, lastLine - STATIC AS LONG callStackLength + STATIC AS LONG callStackLength, runToLine STATIC AS _BYTE pauseMode, stepOver, bypass, setNextLine STATIC buffer$, endc$ DIM AS LONG i @@ -121,6 +121,7 @@ SUB vwatch (localVariables AS _OFFSET) CASE "break" pauseMode = -1 stepOver = 0 + runToLine = 0 cmd$ = "" CASE "set breakpoint" vwatch_breakpoints(CVL(value$)) = -1 @@ -145,6 +146,13 @@ SUB vwatch (localVariables AS _OFFSET) pauseMode = -1 END IF + IF runToLine > 0 AND runToLine <> vwatch_linenumber THEN + EXIT SUB + ELSEIF runToLine > 0 AND runToLine = vwatch_linenumber THEN + pauseMode = -1 + runToLine = 0 + END IF + IF vwatch_breakpoints(vwatch_linenumber) = 0 AND pauseMode = 0 THEN EXIT SUB END IF @@ -162,6 +170,12 @@ SUB vwatch (localVariables AS _OFFSET) stepOver = 0 vwatch_starttimers EXIT SUB + CASE "run to line" + pauseMode = 0 + stepOver = 0 + runToLine = CVL(value$) + vwatch_starttimers + EXIT SUB CASE "step" pauseMode = -1 stepOver = 0