1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00

Fix contextual menu return actions (DebugMode)

This commit is contained in:
FellippeHeitor 2021-10-03 20:09:18 -03:00
parent b85d128faa
commit f175fd2846

View file

@ -759,6 +759,7 @@ FUNCTION ide2 (ignore)
GOSUB redrawItAll GOSUB redrawItAll
GOTO ExitDebugMode 'IdeDebugMode must be 0 here, if not, DebugMode errored. GOTO ExitDebugMode 'IdeDebugMode must be 0 here, if not, DebugMode errored.
END IF END IF
IF c$ = CHR$(254) THEN IF c$ = CHR$(254) THEN
'$DEBUG mode on '$DEBUG mode on
IdeDebugMode = 1 IdeDebugMode = 1
@ -5768,46 +5769,51 @@ FUNCTION ide2 (ignore)
END IF END IF
IF menu$(m, s) = "#Watch List... F4" THEN IF menu$(m, s) = "#Watch List... F4" THEN
PCOPY 2, 0 IF IdeDebugMode = 2 THEN
showWatchList: IdeDebugMode = 16
IF vWatchOn = 0 THEN GOTO EnterDebugMode
IF AutoAddDebugCommand = 0 THEN
SCREEN , , 3, 0
clearStatusWindow 2
COLOR 14, 1
x = 2
y = idewy - 2
printWrapStatus x, y, x, "$DEBUG metacommand is required for Watch List functionality."
PCOPY 3, 0
GOTO ideloop
END IF
result = idemessagebox("Watch List", "Insert $DEBUG metacommand?", "#Yes;#No")
IF result = 1 THEN
ideselect = 0
ideinsline 1, SCase$("$Debug")
idecy = idecy + 1
idechangemade = 1
GOTO ideloop
ELSE
GOTO ideloop
END IF
ELSE ELSE
IF idecompiling = 1 THEN PCOPY 2, 0
SCREEN , , 3, 0 showWatchList:
COLOR 14, 1 IF vWatchOn = 0 THEN
x = 2 IF AutoAddDebugCommand = 0 THEN
y = idewy - 2 SCREEN , , 3, 0
printWrapStatus x, y, x, "Variable List will be available after syntax checking is done..." clearStatusWindow 2
PCOPY 3, 0 COLOR 14, 1
GOTO ideloop x = 2
y = idewy - 2
printWrapStatus x, y, x, "$DEBUG metacommand is required for Watch List functionality."
PCOPY 3, 0
GOTO ideloop
END IF
result = idemessagebox("Watch List", "Insert $DEBUG metacommand?", "#Yes;#No")
IF result = 1 THEN
ideselect = 0
ideinsline 1, SCase$("$Debug")
idecy = idecy + 1
idechangemade = 1
GOTO ideloop
ELSE
GOTO ideloop
END IF
ELSE ELSE
result$ = idevariablewatchbox$("", "", 0, 0) IF idecompiling = 1 THEN
PCOPY 3, 0: SCREEN , , 3, 0 SCREEN , , 3, 0
GOTO ideloop COLOR 14, 1
x = 2
y = idewy - 2
printWrapStatus x, y, x, "Variable List will be available after syntax checking is done..."
PCOPY 3, 0
GOTO ideloop
ELSE
result$ = idevariablewatchbox$("", "", 0, 0)
PCOPY 3, 0: SCREEN , , 3, 0
GOTO ideloop
END IF
END IF END IF
PCOPY 3, 0: SCREEN , , 3, 0
GOTO ideloop
END IF END IF
PCOPY 3, 0: SCREEN , , 3, 0
GOTO ideloop
END IF END IF
IF menu$(m, s) = "Call #Stack... F12" OR menu$(m, s) = "Call Stack... F12" THEN IF menu$(m, s) = "Call #Stack... F12" OR menu$(m, s) = "Call Stack... F12" THEN
@ -6440,6 +6446,10 @@ SUB DebugMode
SCREEN , , 3, 0 SCREEN , , 3, 0
COLOR 15, 3: _PRINTSTRING (1, 1), SPACE$(LEN(menubar$))
m$ = "$DEBUG MODE ACTIVE"
_PRINTSTRING ((idewx - LEN(m$)) \ 2, 1), m$
TYPE vWatchPanelType TYPE vWatchPanelType
AS INTEGER x, y, w, h, firstVisible, hPos, vBarThumb, hBarThumb AS INTEGER x, y, w, h, firstVisible, hPos, vBarThumb, hBarThumb
AS INTEGER draggingVBar, draggingHBar, mX, mY AS INTEGER draggingVBar, draggingHBar, mX, mY
@ -6509,7 +6519,7 @@ SUB DebugMode
CASE 4: IdeDebugMode = 1: GOTO requestContinue CASE 4: IdeDebugMode = 1: GOTO requestContinue
CASE 5: IdeDebugMode = 1: GOTO requestStepOut CASE 5: IdeDebugMode = 1: GOTO requestStepOut
CASE 6: IdeDebugMode = 1: GOTO requestStepOver CASE 6: IdeDebugMode = 1: GOTO requestStepOver
CASE 7: IdeDebugMode = 1: GOTO requestPause CASE 7: IdeDebugMode = 1: GOTO requestStepInto
CASE 8 CASE 8
IdeDebugMode = 1 IdeDebugMode = 1
result = idecy result = idecy
@ -6527,12 +6537,9 @@ SUB DebugMode
GOTO requestSetNextLine GOTO requestSetNextLine
CASE 14: IdeDebugMode = 1: GOTO requestSubsDialog CASE 14: IdeDebugMode = 1: GOTO requestSubsDialog
CASE 15: IdeDebugMode = 1: GOTO requestUnskipAllLines CASE 15: IdeDebugMode = 1: GOTO requestUnskipAllLines
CASE 16: IdeDebugMode = 1: GOTO requestVariableWatch
END SELECT END SELECT
COLOR 15, 3: _PRINTSTRING (1, 1), SPACE$(LEN(menubar$))
m$ = "$DEBUG MODE ACTIVE"
_PRINTSTRING ((idewx - LEN(m$)) \ 2, 1), m$
dummy = DarkenFGBG(1) dummy = DarkenFGBG(1)
clearStatusWindow 0 clearStatusWindow 0
setStatusMessage 1, "Entering $DEBUG mode (ESC to abort)...", 15 setStatusMessage 1, "Entering $DEBUG mode (ESC to abort)...", 15
@ -7422,6 +7429,7 @@ SUB DebugMode
END IF END IF
CASE 16640 'F7 CASE 16640 'F7
F7: F7:
requestStepInto:
IF PauseMode = 0 THEN IF PauseMode = 0 THEN
cmd$ = "break" cmd$ = "break"
PauseMode = -1 PauseMode = -1