mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-16 23:35:15 +00:00
F4 now pauses execution before showing the var watch dialog.
This commit is contained in:
parent
5e2f40c4f1
commit
6a04700026
|
@ -1618,7 +1618,7 @@ FUNCTION ide2 (ignore)
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF KB = KEY_F4 THEN 'variable watch
|
IF KB = KEY_F4 THEN 'variable watch
|
||||||
result = idevariablewatchbox
|
result = idevariablewatchbox("")
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
GOTO ideloop
|
GOTO ideloop
|
||||||
END IF
|
END IF
|
||||||
|
@ -6748,11 +6748,14 @@ SUB DebugMode
|
||||||
cmd$ = "break"
|
cmd$ = "break"
|
||||||
PauseMode = -1
|
PauseMode = -1
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
END IF
|
estabilishingScope = -1
|
||||||
result = idevariablewatchbox
|
ELSE
|
||||||
|
requestVariableWatch:
|
||||||
|
result = idevariablewatchbox(currentSub$)
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
WHILE _MOUSEINPUT: WEND
|
WHILE _MOUSEINPUT: WEND
|
||||||
GOSUB UpdateDisplay
|
GOSUB UpdateDisplay
|
||||||
|
END IF
|
||||||
CASE 16128 'F5
|
CASE 16128 'F5
|
||||||
requestContinue:
|
requestContinue:
|
||||||
PauseMode = 0
|
PauseMode = 0
|
||||||
|
@ -7009,6 +7012,11 @@ SUB DebugMode
|
||||||
vwatch_string_seq1_done:
|
vwatch_string_seq1_done:
|
||||||
CASE "current sub"
|
CASE "current sub"
|
||||||
currentSub$ = value$
|
currentSub$ = value$
|
||||||
|
IF estabilishingScope THEN
|
||||||
|
estabilishingScope = 0
|
||||||
|
GOSUB UpdateDisplay
|
||||||
|
GOTO requestVariableWatch
|
||||||
|
END IF
|
||||||
CASE "quit"
|
CASE "quit"
|
||||||
CLOSE #client&
|
CLOSE #client&
|
||||||
dummy = DarkenFGBG(0)
|
dummy = DarkenFGBG(0)
|
||||||
|
@ -7092,7 +7100,7 @@ SUB DebugMode
|
||||||
|
|
||||||
END SUB
|
END SUB
|
||||||
|
|
||||||
FUNCTION idevariablewatchbox
|
FUNCTION idevariablewatchbox(currentScope$)
|
||||||
|
|
||||||
'-------- generic dialog box header --------
|
'-------- generic dialog box header --------
|
||||||
PCOPY 0, 2
|
PCOPY 0, 2
|
||||||
|
@ -7111,6 +7119,7 @@ FUNCTION idevariablewatchbox
|
||||||
maxModuleNameLen = LEN(mainmodule$)
|
maxModuleNameLen = LEN(mainmodule$)
|
||||||
maxVarLen = LEN("Variable")
|
maxVarLen = LEN("Variable")
|
||||||
maxTypeLen = LEN("Type")
|
maxTypeLen = LEN("Type")
|
||||||
|
highlightColor = 12
|
||||||
|
|
||||||
TYPE varDlgList
|
TYPE varDlgList
|
||||||
AS LONG index, colorFlag, indicator
|
AS LONG index, colorFlag, indicator
|
||||||
|
@ -7139,7 +7148,7 @@ FUNCTION idevariablewatchbox
|
||||||
varDlgList(totalVisibleVariables).colorFlag = LEN(l$) + 1
|
varDlgList(totalVisibleVariables).colorFlag = LEN(l$) + 1
|
||||||
varDlgList(totalVisibleVariables).indicator = LEN(l$) + 2
|
varDlgList(totalVisibleVariables).indicator = LEN(l$) + 2
|
||||||
IF usedVariableList(x).watch THEN
|
IF usedVariableList(x).watch THEN
|
||||||
l$ = l$ + CHR$(12) + "+"
|
l$ = l$ + CHR$(highlightColor) + "+"
|
||||||
ELSE
|
ELSE
|
||||||
l$ = l$ + CHR$(16) + " "
|
l$ = l$ + CHR$(16) + " "
|
||||||
END IF
|
END IF
|
||||||
|
@ -7157,8 +7166,14 @@ FUNCTION idevariablewatchbox
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
l$ = l$ + text$ + l3$
|
l$ = l$ + text$ + l3$
|
||||||
IF IdeDebugMode > 0 AND LEN(usedVariableList(x).mostRecentValue) > 0 THEN
|
IF IdeDebugMode > 0 THEN
|
||||||
l$ = l$ + " = " + usedVariableList(x).mostRecentValue
|
IF usedVariableList(x).watch THEN
|
||||||
|
IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" THEN
|
||||||
|
l$ = l$ + " = " + CHR$(16) + CHR$(highlightcolor) + usedVariableList(x).mostRecentValue
|
||||||
|
ELSE
|
||||||
|
l$ = l$ + " " + CHR$(16) + CHR$(2) + "<out of scope>"
|
||||||
|
END IF
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
IF x < totalVariablesCreated THEN l$ = l$ + sep
|
IF x < totalVariablesCreated THEN l$ = l$ + sep
|
||||||
NEXT
|
NEXT
|
||||||
|
@ -7269,7 +7284,7 @@ FUNCTION idevariablewatchbox
|
||||||
IF (focus = 2 AND info <> 0) THEN 'add all
|
IF (focus = 2 AND info <> 0) THEN 'add all
|
||||||
FOR y = 1 TO totalVisibleVariables
|
FOR y = 1 TO totalVisibleVariables
|
||||||
usedVariableList(varDlgList(y).index).watch = -1
|
usedVariableList(varDlgList(y).index).watch = -1
|
||||||
ASC(idetxt(o(varListBox).txt), varDlgList(y).colorFlag) = 12
|
ASC(idetxt(o(varListBox).txt), varDlgList(y).colorFlag) = highlightColor
|
||||||
ASC(idetxt(o(varListBox).txt), varDlgList(y).indicator) = 43 '+
|
ASC(idetxt(o(varListBox).txt), varDlgList(y).indicator) = 43 '+
|
||||||
NEXT
|
NEXT
|
||||||
END IF
|
END IF
|
||||||
|
@ -7305,7 +7320,7 @@ FUNCTION idevariablewatchbox
|
||||||
IF y >= 1 AND y <= totalVisibleVariables THEN
|
IF y >= 1 AND y <= totalVisibleVariables THEN
|
||||||
usedVariableList(varDlgList(y).index).watch = NOT usedVariableList(varDlgList(y).index).watch
|
usedVariableList(varDlgList(y).index).watch = NOT usedVariableList(varDlgList(y).index).watch
|
||||||
IF usedVariableList(varDlgList(y).index).watch THEN
|
IF usedVariableList(varDlgList(y).index).watch THEN
|
||||||
ASC(idetxt(o(varListBox).txt), varDlgList(y).colorFlag) = 12
|
ASC(idetxt(o(varListBox).txt), varDlgList(y).colorFlag) = highlightColor
|
||||||
ASC(idetxt(o(varListBox).txt), varDlgList(y).indicator) = 43 '+
|
ASC(idetxt(o(varListBox).txt), varDlgList(y).indicator) = 43 '+
|
||||||
ELSE
|
ELSE
|
||||||
ASC(idetxt(o(varListBox).txt), varDlgList(y).colorFlag) = 16
|
ASC(idetxt(o(varListBox).txt), varDlgList(y).colorFlag) = 16
|
||||||
|
|
Loading…
Reference in a new issue