mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-15 23:05:14 +00:00
Merge branch 'var-export' into development
This commit is contained in:
commit
151d9c544e
|
@ -5397,6 +5397,14 @@ extern uint32 error_retry;
|
||||||
|
|
||||||
void sub__echo(qbs *message);
|
void sub__echo(qbs *message);
|
||||||
|
|
||||||
|
void unlockvWatchHandle() {
|
||||||
|
if (vwatch>0) vwatch=-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32 vWatchHandle() {
|
||||||
|
return vwatch;
|
||||||
|
}
|
||||||
|
|
||||||
void sub__assert(int32 expression, qbs *assert_message, int32 passed) {
|
void sub__assert(int32 expression, qbs *assert_message, int32 passed) {
|
||||||
if (asserts==0) return;
|
if (asserts==0) return;
|
||||||
if (expression==0) {
|
if (expression==0) {
|
||||||
|
@ -13096,7 +13104,11 @@ void sub_close(int32 i2,int32 passed){
|
||||||
|
|
||||||
|
|
||||||
for (i=1;i<=special_handles->indexes;i++){
|
for (i=1;i<=special_handles->indexes;i++){
|
||||||
sub_close(-i-1,1);
|
if (vwatch>0 && vwatch==i) {
|
||||||
|
//keep connection to the IDE open for $DEBUG mode
|
||||||
|
} else {
|
||||||
|
sub_close(-i-1,1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21892,7 +21904,11 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
if ((method==0)||(method==1)){
|
if ((method==0)||(method==1)){
|
||||||
|
|
||||||
if (parts<2) return -1;
|
if (parts<2) return -1;
|
||||||
if (qbs_equal(qbs_ucase(info_part[1]),qbs_new_txt("TCP/IP"))==0) return -1;
|
if (qbs_equal(qbs_ucase(info_part[1]),qbs_new_txt("TCP/IP"))==0) {
|
||||||
|
if (qbs_equal(qbs_ucase(info_part[1]),qbs_new_txt("QB64IDE"))==0 || vwatch!=-1) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
d=func_val(info_part[2]);
|
d=func_val(info_part[2]);
|
||||||
port=qbr_double_to_long(d);//***assume*** port number is within valid range
|
port=qbr_double_to_long(d);//***assume*** port number is within valid range
|
||||||
|
@ -21923,6 +21939,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
//init stream
|
//init stream
|
||||||
my_stream_struct->in=NULL; my_stream_struct->in_size=0; my_stream_struct->in_limit=0;
|
my_stream_struct->in=NULL; my_stream_struct->in_size=0; my_stream_struct->in_limit=0;
|
||||||
|
|
||||||
|
if (vwatch==-1) vwatch=my_handle;
|
||||||
return my_handle;
|
return my_handle;
|
||||||
}//client
|
}//client
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ extern void sub__consolefont(qbs* FontName, int FontSize);
|
||||||
extern void sub__console_cursor(int32 visible, int32 cursorsize, int32 passed);
|
extern void sub__console_cursor(int32 visible, int32 cursorsize, int32 passed);
|
||||||
extern int32 func__getconsoleinput();
|
extern int32 func__getconsoleinput();
|
||||||
|
|
||||||
|
extern void unlockvWatchHandle();
|
||||||
|
extern int32 vWatchHandle();
|
||||||
|
|
||||||
#ifdef DEPENDENCY_ZLIB
|
#ifdef DEPENDENCY_ZLIB
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
qbs *func__deflate(qbs *text);
|
qbs *func__deflate(qbs *text);
|
||||||
|
|
|
@ -6410,6 +6410,8 @@ SUB DebugMode
|
||||||
noFocusMessage = -1
|
noFocusMessage = -1
|
||||||
|
|
||||||
DO 'main loop
|
DO 'main loop
|
||||||
|
IF _EXIT THEN ideexit = 1: GOTO requestQuit
|
||||||
|
|
||||||
bkpidecy = idecy
|
bkpidecy = idecy
|
||||||
WHILE _MOUSEINPUT: idecy = idecy + _MOUSEWHEEL * 3: WEND
|
WHILE _MOUSEINPUT: idecy = idecy + _MOUSEWHEEL * 3: WEND
|
||||||
|
|
||||||
|
@ -6656,6 +6658,7 @@ SUB DebugMode
|
||||||
r$ = idesubs
|
r$ = idesubs
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
GOSUB UpdateDisplay
|
GOSUB UpdateDisplay
|
||||||
|
WHILE _MOUSEINPUT: WEND
|
||||||
CASE 15872 'F4
|
CASE 15872 'F4
|
||||||
IF PauseMode THEN
|
IF PauseMode THEN
|
||||||
requestCallStack:
|
requestCallStack:
|
||||||
|
@ -6668,9 +6671,13 @@ SUB DebugMode
|
||||||
setStatusMessage 1, "Requesting call stack...", 7
|
setStatusMessage 1, "Requesting call stack...", 7
|
||||||
|
|
||||||
start! = TIMER
|
start! = TIMER
|
||||||
|
callStackLength = -1
|
||||||
DO
|
DO
|
||||||
GOSUB GetCommand
|
GOSUB GetCommand
|
||||||
IF cmd$ = "call stack size" THEN callStackLength = CVL(value$)
|
IF cmd$ = "call stack size" THEN
|
||||||
|
callStackLength = CVL(value$)
|
||||||
|
IF callStackLength = 0 THEN EXIT DO
|
||||||
|
END IF
|
||||||
_LIMIT 100
|
_LIMIT 100
|
||||||
LOOP UNTIL cmd$ = "call stack" OR TIMER - start! > timeout
|
LOOP UNTIL cmd$ = "call stack" OR TIMER - start! > timeout
|
||||||
|
|
||||||
|
@ -6678,13 +6685,20 @@ SUB DebugMode
|
||||||
'display call stack
|
'display call stack
|
||||||
callstacklist$ = value$
|
callstacklist$ = value$
|
||||||
ShowCallStack:
|
ShowCallStack:
|
||||||
retval = idecallstackbox
|
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
|
||||||
clearStatusWindow 0
|
clearStatusWindow 0
|
||||||
setStatusMessage 1, "Paused.", 2
|
setStatusMessage 1, "Paused.", 2
|
||||||
|
retval = idecallstackbox
|
||||||
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
|
WHILE _MOUSEINPUT: WEND
|
||||||
ELSE
|
ELSE
|
||||||
clearStatusWindow 0
|
IF callStackLength = -1 THEN
|
||||||
setStatusMessage 1, "Error retrieving call stack.", 2
|
callStackLength = 0
|
||||||
|
clearStatusWindow 0
|
||||||
|
setStatusMessage 1, "Error retrieving call stack.", 2
|
||||||
|
ELSEIF callStackLength = 0 THEN
|
||||||
|
clearStatusWindow 0
|
||||||
|
setStatusMessage 1, "No call stack log available.", 2
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
noFocusMessage = NOT noFocusMessage
|
noFocusMessage = NOT noFocusMessage
|
||||||
END IF
|
END IF
|
||||||
|
@ -6757,8 +6771,9 @@ SUB DebugMode
|
||||||
IF _KEYDOWN(100304) OR _KEYDOWN(100303) THEN
|
IF _KEYDOWN(100304) OR _KEYDOWN(100303) THEN
|
||||||
result = idegetlinenumberbox("Run To Line", idecy)
|
result = idegetlinenumberbox("Run To Line", idecy)
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
|
WHILE _MOUSEINPUT: WEND
|
||||||
requestRunToThisLine:
|
requestRunToThisLine:
|
||||||
IF result > 0 AND result < iden THEN
|
IF result > 0 AND result <= iden THEN
|
||||||
PauseMode = 0
|
PauseMode = 0
|
||||||
debugnextline = 0
|
debugnextline = 0
|
||||||
cmd$ = "run to line:" + MKL$(result)
|
cmd$ = "run to line:" + MKL$(result)
|
||||||
|
@ -6771,8 +6786,9 @@ SUB DebugMode
|
||||||
ELSE
|
ELSE
|
||||||
result = idegetlinenumberbox("Set Next Line", idecy)
|
result = idegetlinenumberbox("Set Next Line", idecy)
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
|
WHILE _MOUSEINPUT: WEND
|
||||||
requestSetNextLine:
|
requestSetNextLine:
|
||||||
IF result > 0 AND result < iden THEN
|
IF result > 0 AND result <= iden THEN
|
||||||
cmd$ = "set next line:" + MKL$(result)
|
cmd$ = "set next line:" + MKL$(result)
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
END IF
|
END IF
|
||||||
|
@ -6782,6 +6798,7 @@ SUB DebugMode
|
||||||
IF _KEYDOWN(100306) OR _KEYDOWN(100305) THEN
|
IF _KEYDOWN(100306) OR _KEYDOWN(100305) THEN
|
||||||
result = idegetlinenumberbox("Skip Line", idecy)
|
result = idegetlinenumberbox("Skip Line", idecy)
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
|
WHILE _MOUSEINPUT: WEND
|
||||||
requestToggleSkipLine:
|
requestToggleSkipLine:
|
||||||
IF result > 0 AND result <= iden THEN
|
IF result > 0 AND result <= iden THEN
|
||||||
IdeSkipLines(result) = NOT IdeSkipLines(result)
|
IdeSkipLines(result) = NOT IdeSkipLines(result)
|
||||||
|
@ -6838,15 +6855,19 @@ SUB DebugMode
|
||||||
'requested when the program is about to quit or
|
'requested when the program is about to quit or
|
||||||
'when an error just occurred
|
'when an error just occurred
|
||||||
callStackLength = CVL(value$)
|
callStackLength = CVL(value$)
|
||||||
start! = TIMER
|
IF callStackLength THEN
|
||||||
DO
|
start! = TIMER
|
||||||
GOSUB GetCommand
|
DO
|
||||||
_LIMIT 100
|
GOSUB GetCommand
|
||||||
LOOP UNTIL cmd$ = "call stack" OR TIMER - start! > timeout
|
_LIMIT 100
|
||||||
|
LOOP UNTIL cmd$ = "call stack" OR TIMER - start! > timeout
|
||||||
|
|
||||||
IF cmd$ = "call stack" THEN
|
IF cmd$ = "call stack" THEN
|
||||||
'store call stack
|
'store call stack
|
||||||
callstacklist$ = value$
|
callstacklist$ = value$
|
||||||
|
END IF
|
||||||
|
ELSE
|
||||||
|
callstacklist$ = ""
|
||||||
END IF
|
END IF
|
||||||
END SELECT
|
END SELECT
|
||||||
|
|
||||||
|
@ -6906,19 +6927,25 @@ FUNCTION idecallstackbox
|
||||||
'-------- init --------
|
'-------- init --------
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
idepar p, idewx - 8, idewy + idesubwindow - 6, "$DEBUG MODE"
|
|
||||||
|
dialogHeight = callStackLength + 4
|
||||||
|
IF dialogHeight > idewy + idesubwindow - 6 THEN
|
||||||
|
dialogHeight = idewy + idesubwindow - 6
|
||||||
|
END IF
|
||||||
|
|
||||||
|
idepar p, idewx - 8, dialogHeight, "$DEBUG MODE"
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 2
|
o(i).typ = 2
|
||||||
o(i).y = 2
|
o(i).y = 2
|
||||||
o(i).w = idewx - 12: o(i).h = idewy + idesubwindow - 10
|
o(i).w = idewx - 12: o(i).h = dialogHeight - 4
|
||||||
o(i).txt = idenewtxt(callstacklist$)
|
o(i).txt = idenewtxt(callstacklist$)
|
||||||
o(i).sel = callStackLength
|
o(i).sel = callStackLength
|
||||||
o(i).nam = idenewtxt("Call Stack")
|
o(i).nam = idenewtxt("Call Stack")
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 3
|
o(i).typ = 3
|
||||||
o(i).y = idewy + idesubwindow - 6
|
o(i).y = dialogHeight
|
||||||
o(i).txt = idenewtxt("#Close")
|
o(i).txt = idenewtxt("#Close")
|
||||||
o(i).dft = 1
|
o(i).dft = 1
|
||||||
|
|
||||||
|
@ -8270,6 +8297,7 @@ FUNCTION idegetline$ (i)
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
SUB idecentercurrentline
|
SUB idecentercurrentline
|
||||||
|
IF iden <= idewy - 8 THEN EXIT SUB
|
||||||
idesy = idecy - (idewy - 8) \ 2
|
idesy = idecy - (idewy - 8) \ 2
|
||||||
IF idesy < 1 THEN idesy = 1
|
IF idesy < 1 THEN idesy = 1
|
||||||
END SUB
|
END SUB
|
||||||
|
@ -8748,6 +8776,7 @@ FUNCTION idefiledialog$(programname$, mode AS _BYTE)
|
||||||
'-------- custom display changes --------
|
'-------- custom display changes --------
|
||||||
COLOR 0, 7: _PRINTSTRING (p.x + 2, p.y + 4), "Path: "
|
COLOR 0, 7: _PRINTSTRING (p.x + 2, p.y + 4), "Path: "
|
||||||
a$ = path$
|
a$ = path$
|
||||||
|
IF LEN(a$) = 2 AND RIGHT$(a$, 1) = ":" THEN a$ = a$ + "\"
|
||||||
w = p.w - 8
|
w = p.w - 8
|
||||||
IF LEN(a$) > w - 3 THEN a$ = STRING$(3, 250) + RIGHT$(a$, w - 3)
|
IF LEN(a$) > w - 3 THEN a$ = STRING$(3, 250) + RIGHT$(a$, w - 3)
|
||||||
_PRINTSTRING (p.x + 2 + 6, p.y + 4), a$
|
_PRINTSTRING (p.x + 2 + 6, p.y + 4), a$
|
||||||
|
@ -10074,13 +10103,17 @@ FUNCTION idesubs$
|
||||||
|
|
||||||
'72,19
|
'72,19
|
||||||
i = 0
|
i = 0
|
||||||
idepar p, idewx - 8, idewy + idesubwindow - 6, "SUBs"
|
dialogHeight = TotalSUBs + 4
|
||||||
|
IF dialogHeight > idewy + idesubwindow - 6 THEN
|
||||||
|
dialogHeight = idewy + idesubwindow - 6
|
||||||
|
END IF
|
||||||
|
idepar p, idewx - 8, dialogHeight, "SUBs"
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 2
|
o(i).typ = 2
|
||||||
o(i).y = 1
|
o(i).y = 1
|
||||||
'68
|
'68
|
||||||
o(i).w = idewx - 12: o(i).h = idewy + idesubwindow - 9
|
o(i).w = idewx - 12: o(i).h = dialogHeight - 3
|
||||||
IF SortedSubsFlag = 0 THEN
|
IF SortedSubsFlag = 0 THEN
|
||||||
IF IDESubsLength THEN
|
IF IDESubsLength THEN
|
||||||
o(i).txt = idenewtxt(lSized$)
|
o(i).txt = idenewtxt(lSized$)
|
||||||
|
@ -10121,14 +10154,14 @@ FUNCTION idesubs$
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 4 'check box
|
o(i).typ = 4 'check box
|
||||||
o(i).x = 2
|
o(i).x = 2
|
||||||
o(i).y = idewy + idesubwindow - 6
|
o(i).y = dialogHeight
|
||||||
o(i).nam = idenewtxt("#Line Count")
|
o(i).nam = idenewtxt("#Line Count")
|
||||||
o(i).sel = IDESubsLength
|
o(i).sel = IDESubsLength
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 4 'check box
|
o(i).typ = 4 'check box
|
||||||
o(i).x = 18
|
o(i).x = 18
|
||||||
o(i).y = idewy + idesubwindow - 6
|
o(i).y = dialogHeight
|
||||||
o(i).nam = idenewtxt("#Sort")
|
o(i).nam = idenewtxt("#Sort")
|
||||||
o(i).sel = SortedSubsFlag
|
o(i).sel = SortedSubsFlag
|
||||||
|
|
||||||
|
@ -10136,8 +10169,12 @@ FUNCTION idesubs$
|
||||||
o(i).typ = 3
|
o(i).typ = 3
|
||||||
o(i).x = p.x + p.w - 26
|
o(i).x = p.x + p.w - 26
|
||||||
o(i).w = 26
|
o(i).w = 26
|
||||||
o(i).y = idewy + idesubwindow - 6
|
o(i).y = dialogHeight
|
||||||
o(i).txt = idenewtxt("#Edit" + sep + "#Cancel")
|
IF IdeDebugMode = 0 THEN
|
||||||
|
o(i).txt = idenewtxt("#Edit" + sep + "#Cancel")
|
||||||
|
ELSE
|
||||||
|
o(i).txt = idenewtxt("#View" + sep + "#Cancel")
|
||||||
|
END IF
|
||||||
o(i).dft = 1
|
o(i).dft = 1
|
||||||
|
|
||||||
|
|
||||||
|
@ -10358,19 +10395,23 @@ FUNCTION idelanguagebox
|
||||||
l$ = UCASE$(l$)
|
l$ = UCASE$(l$)
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
idepar p, idewx - 8, idewy + idesubwindow - 6, "Language"
|
dialogHeight = idecpnum + 4
|
||||||
|
IF dialogHeight > idewy + idesubwindow - 6 THEN
|
||||||
|
dialogHeight = idewy + idesubwindow - 6
|
||||||
|
END IF
|
||||||
|
idepar p, idewx - 8, dialogHeight, "Language"
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 2
|
o(i).typ = 2
|
||||||
o(i).y = 2
|
o(i).y = 2
|
||||||
o(i).w = idewx - 12: o(i).h = idewy + idesubwindow - 10
|
o(i).w = idewx - 12: o(i).h = dialogheight - 4
|
||||||
o(i).txt = idenewtxt(l$)
|
o(i).txt = idenewtxt(l$)
|
||||||
o(i).sel = 1: IF idecpindex THEN o(i).sel = idecpindex
|
o(i).sel = 1: IF idecpindex THEN o(i).sel = idecpindex
|
||||||
o(i).nam = idenewtxt("Code Pages")
|
o(i).nam = idenewtxt("Code Pages")
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
o(i).typ = 3
|
o(i).typ = 3
|
||||||
o(i).y = idewy + idesubwindow - 6
|
o(i).y = dialogheight
|
||||||
o(i).txt = idenewtxt("#OK" + sep + "#Cancel")
|
o(i).txt = idenewtxt("#OK" + sep + "#Cancel")
|
||||||
o(i).dft = 1
|
o(i).dft = 1
|
||||||
|
|
||||||
|
@ -11293,7 +11334,7 @@ FUNCTION idezchangepath$ (path$, newpath$)
|
||||||
END IF
|
END IF
|
||||||
'change drive
|
'change drive
|
||||||
IF LEN(newpath$) = 2 AND RIGHT$(newpath$, 1) = ":" THEN
|
IF LEN(newpath$) = 2 AND RIGHT$(newpath$, 1) = ":" THEN
|
||||||
idezchangepath$ = newpath$ + "\"
|
idezchangepath$ = newpath$
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
idezchangepath$ = path$ + "\" + newpath$
|
idezchangepath$ = path$ + "\" + newpath$
|
||||||
|
|
|
@ -27,8 +27,11 @@ REDIM SHARED PP_TypeMod(0) AS STRING, PP_ConvertedMod(0) AS STRING 'Prepass Name
|
||||||
Set_OrderOfOperations
|
Set_OrderOfOperations
|
||||||
|
|
||||||
DIM SHARED vWatchOn, vWatchRecompileAttempts, vWatchDesiredState, vWatchErrorCall$
|
DIM SHARED vWatchOn, vWatchRecompileAttempts, vWatchDesiredState, vWatchErrorCall$
|
||||||
DIM SHARED vWatchNewVariable$
|
DIM SHARED vWatchNewVariable$, vWatchVariableExclusions$
|
||||||
vWatchErrorCall$ = "if (stop_program) {*__LONG_VWATCH_LINENUMBER=0; SUB_VWATCH((ptrszint*)vwatch_local_vars);};if(new_error){bkp_new_error=new_error;new_error=0;*__LONG_VWATCH_LINENUMBER=-1; SUB_VWATCH((ptrszint*)vwatch_local_vars);new_error=bkp_new_error;};"
|
vWatchErrorCall$ = "if (stop_program) {*__LONG_VWATCH_LINENUMBER=0; SUB_VWATCH((ptrszint*)vwatch_local_vars);};if(new_error){bkp_new_error=new_error;new_error=0;*__LONG_VWATCH_LINENUMBER=-1; SUB_VWATCH((ptrszint*)vwatch_local_vars);new_error=bkp_new_error;};"
|
||||||
|
vWatchVariableExclusions$ = "@__LONG_VWATCH_LINENUMBER@__LONG_VWATCH_SUBLEVEL@__LONG_VWATCH_GOTO@" + _
|
||||||
|
"@__STRING_VWATCH_SUBNAME@__STRING_VWATCH_CALLSTACK@__ARRAY_BYTE_VWATCH_BREAKPOINTS" + _
|
||||||
|
"@__ARRAY_BYTE_VWATCH_SKIPLINES@"
|
||||||
|
|
||||||
DIM SHARED qb64prefix_set_recompileAttempts, qb64prefix_set_desiredState
|
DIM SHARED qb64prefix_set_recompileAttempts, qb64prefix_set_desiredState
|
||||||
DIM SHARED opex_recompileAttempts, opex_desiredState
|
DIM SHARED opex_recompileAttempts, opex_desiredState
|
||||||
|
@ -8765,7 +8768,16 @@ DO
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
IF firstelement$ = "CHAIN" THEN
|
||||||
|
IF vWatchOn THEN
|
||||||
|
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $DEBUG MODE", "CHAIN"
|
||||||
|
END IF
|
||||||
|
END IF
|
||||||
|
|
||||||
IF firstelement$ = "RUN" THEN 'RUN
|
IF firstelement$ = "RUN" THEN 'RUN
|
||||||
|
IF vWatchOn THEN
|
||||||
|
addWarning linenumber, inclevel, inclinenumber(inclevel), incname$(inclevel), "Feature incompatible with $DEBUG MODE", "RUN"
|
||||||
|
END IF
|
||||||
l$ = SCase$("Run")
|
l$ = SCase$("Run")
|
||||||
IF n = 1 THEN
|
IF n = 1 THEN
|
||||||
'no parameters
|
'no parameters
|
||||||
|
@ -11395,6 +11407,9 @@ FOR i = 1 TO idn
|
||||||
getid i
|
getid i
|
||||||
IF Error_Happened THEN GOTO errmes
|
IF Error_Happened THEN GOTO errmes
|
||||||
IF id.arrayelements = -1 THEN GOTO clearerasereturned 'cannot erase non-existant array
|
IF id.arrayelements = -1 THEN GOTO clearerasereturned 'cannot erase non-existant array
|
||||||
|
IF INSTR(vWatchVariableExclusions$, "@" + RTRIM$(id.callname) + "@") > 0 THEN
|
||||||
|
GOTO clearerasereturned
|
||||||
|
END IF
|
||||||
clearerasereturn = 1: GOTO clearerase
|
clearerasereturn = 1: GOTO clearerase
|
||||||
END IF 'array
|
END IF 'array
|
||||||
|
|
||||||
|
@ -11417,14 +11432,18 @@ FOR i = 1 TO idn
|
||||||
PRINT #12, "memset((void*)(" + e$ + "->chr),0," + bytes$ + ");"
|
PRINT #12, "memset((void*)(" + e$ + "->chr),0," + bytes$ + ");"
|
||||||
GOTO cleared
|
GOTO cleared
|
||||||
ELSE
|
ELSE
|
||||||
PRINT #12, e$ + "->len=0;"
|
IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN
|
||||||
|
PRINT #12, e$ + "->len=0;"
|
||||||
|
END IF
|
||||||
GOTO cleared
|
GOTO cleared
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
IF typ AND ISUDT THEN
|
IF typ AND ISUDT THEN
|
||||||
PRINT #12, "memset((void*)" + e$ + ",0," + bytes$ + ");"
|
PRINT #12, "memset((void*)" + e$ + ",0," + bytes$ + ");"
|
||||||
ELSE
|
ELSE
|
||||||
PRINT #12, "*" + e$ + "=0;"
|
IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN
|
||||||
|
PRINT #12, "*" + e$ + "=0;"
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
GOTO cleared
|
GOTO cleared
|
||||||
END IF 'non-array variable
|
END IF 'non-array variable
|
||||||
|
@ -11695,7 +11714,7 @@ ELSE
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF vWatchOn THEN
|
IF vWatchOn THEN
|
||||||
PRINT #18, "int32 vwatch=1;"
|
PRINT #18, "int32 vwatch=-1;"
|
||||||
ELSE
|
ELSE
|
||||||
PRINT #18, "int32 vwatch=0;"
|
PRINT #18, "int32 vwatch=0;"
|
||||||
END IF
|
END IF
|
||||||
|
@ -14197,17 +14216,10 @@ END SUB
|
||||||
SUB vWatchVariable (this$, action AS _BYTE)
|
SUB vWatchVariable (this$, action AS _BYTE)
|
||||||
STATIC totalLocalVariables AS LONG, localVariablesList$
|
STATIC totalLocalVariables AS LONG, localVariablesList$
|
||||||
STATIC totalMainModuleVariables AS LONG, mainModuleVariablesList$
|
STATIC totalMainModuleVariables AS LONG, mainModuleVariablesList$
|
||||||
STATIC exclusions$
|
|
||||||
|
|
||||||
IF LEN(exclusions$) = 0 THEN
|
|
||||||
exclusions$ = "@__LONG_VWATCH_LINENUMBER@__LONG_VWATCH_SUBLEVEL@__LONG_VWATCH_GOTO@" + _
|
|
||||||
"@__STRING_VWATCH_SUBNAME@__STRING_VWATCH_CALLSTACK@__ARRAY_BYTE_VWATCH_BREAKPOINTS" + _
|
|
||||||
"@__ARRAY_BYTE_VWATCH_SKIPLINES@"
|
|
||||||
END IF
|
|
||||||
|
|
||||||
SELECT CASE action
|
SELECT CASE action
|
||||||
CASE 0 'add
|
CASE 0 'add
|
||||||
IF INSTR(exclusions$, "@" + this$ + "@") > 0 OR LEFT$(this$, 12) = "_SUB_VWATCH_" THEN
|
IF INSTR(vWatchVariableExclusions$, "@" + this$ + "@") > 0 OR LEFT$(this$, 12) = "_SUB_VWATCH_" THEN
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
DECLARE LIBRARY
|
DECLARE LIBRARY
|
||||||
SUB vwatch_stoptimers ALIAS stop_timers
|
SUB vwatch_stoptimers ALIAS stop_timers
|
||||||
SUB vwatch_starttimers ALIAS start_timers
|
SUB vwatch_starttimers ALIAS start_timers
|
||||||
|
SUB unlockvWatchHandle
|
||||||
END DECLARE
|
END DECLARE
|
||||||
|
|
||||||
IF bypass THEN EXIT SUB
|
IF bypass THEN EXIT SUB
|
||||||
|
@ -35,7 +36,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
SELECT CASE cmd$
|
SELECT CASE cmd$
|
||||||
CASE "vwatch"
|
CASE "vwatch"
|
||||||
IF value$ <> "ok" THEN
|
IF value$ <> "ok" THEN
|
||||||
CLOSE #ideHost
|
unlockvWatchHandle: CLOSE #ideHost
|
||||||
bypass = -1
|
bypass = -1
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
END IF
|
END IF
|
||||||
|
@ -48,7 +49,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
IF LEN(value$) \ 4 <> breakpointCount THEN
|
IF LEN(value$) \ 4 <> breakpointCount THEN
|
||||||
cmd$ = "quit:Communication error."
|
cmd$ = "quit:Communication error."
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
CLOSE #ideHost
|
unlockvWatchHandle: CLOSE #ideHost
|
||||||
bypass = -1
|
bypass = -1
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
END IF
|
END IF
|
||||||
|
@ -62,7 +63,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
IF LEN(value$) \ 4 <> skipCount THEN
|
IF LEN(value$) \ 4 <> skipCount THEN
|
||||||
cmd$ = "quit:Communication error."
|
cmd$ = "quit:Communication error."
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
CLOSE #ideHost
|
unlockvWatchHandle: CLOSE #ideHost
|
||||||
bypass = -1
|
bypass = -1
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
END IF
|
END IF
|
||||||
|
@ -85,7 +86,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
GOSUB SendCallStack
|
GOSUB SendCallStack
|
||||||
cmd$ = "quit:Program ended."
|
cmd$ = "quit:Program ended."
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
CLOSE #ideHost
|
unlockvWatchHandle: CLOSE #ideHost
|
||||||
bypass = -1
|
bypass = -1
|
||||||
ideHost = 0
|
ideHost = 0
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
|
@ -193,7 +194,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
vwatch_starttimers
|
vwatch_starttimers
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
CASE "free"
|
CASE "free"
|
||||||
CLOSE #ideHost
|
unlockvWatchHandle: CLOSE #ideHost
|
||||||
ideHost = 0
|
ideHost = 0
|
||||||
bypass = -1
|
bypass = -1
|
||||||
vwatch_starttimers
|
vwatch_starttimers
|
||||||
|
@ -240,7 +241,7 @@ SUB vwatch (localVariables AS _OFFSET)
|
||||||
start! = TIMER
|
start! = TIMER
|
||||||
DO
|
DO
|
||||||
k& = _KEYHIT
|
k& = _KEYHIT
|
||||||
ideHost = _OPENCLIENT("TCP/IP:" + ideport$ + ":localhost")
|
ideHost = _OPENCLIENT("QB64IDE:" + ideport$ + ":localhost")
|
||||||
_LIMIT 30
|
_LIMIT 30
|
||||||
LOOP UNTIL k& = 27 OR ideHost <> 0 OR TIMER - start! > timeout
|
LOOP UNTIL k& = 27 OR ideHost <> 0 OR TIMER - start! > timeout
|
||||||
IF ideHost = 0 THEN bypass = -1: EXIT SUB
|
IF ideHost = 0 THEN bypass = -1: EXIT SUB
|
||||||
|
|
Loading…
Reference in a new issue