1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-03 07:41:21 +00:00

Handles STOP as a regular breakpoint in $DEBUG mode.

This commit is contained in:
FellippeHeitor 2021-07-19 02:30:16 -03:00
parent 05d5086682
commit bfe081b421
2 changed files with 11 additions and 2 deletions

View file

@ -8855,8 +8855,12 @@ DO
'note: this value is currently ignored but evaluated for checking reasons
END IF
layoutdone = 1: IF LEN(layout$) THEN layout$ = layout$ + sp + l$ ELSE layout$ = l$
PRINT #12, "close_program=1;"
PRINT #12, "end();"
IF vWatchOn = 1 AND NoChecks = 0 THEN
PRINT #12, "*__LONG_VWATCH_LINENUMBER=-3; SUB_VWATCH((ptrszint*)vwatch_local_vars);"
ELSE
PRINT #12, "close_program=1;"
PRINT #12, "end();"
END IF
GOTO finishedline
END IF
END IF

View file

@ -90,6 +90,11 @@ SUB vwatch (localVariables AS _OFFSET)
IF LEN(vwatch_callstack) THEN vwatch_callstack = vwatch_callstack + CHR$(0)
vwatch_callstack = vwatch_callstack + vwatch_subname$ + ", line" + STR$(lastLine)
EXIT SUB
ELSEIF vwatch_linenumber = -3 THEN
'handle STOP - instead of quitting, pause execution
pauseMode = -1
stepOver = 0
EXIT SUB
END IF
IF vwatch_linenumber = lastLine THEN EXIT SUB