1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-26 17:10:38 +00:00

Attempts to become host when $DEBUG is first detected.

Instead of waiting for F5.
This commit is contained in:
Fellippe Heitor 2021-07-12 12:54:23 -03:00
parent 6d696aed4d
commit f204d5685b
2 changed files with 12 additions and 1 deletions

View file

@ -11,6 +11,7 @@ DIM SHARED IDEBuildModeChanged
DIM SHARED IdeInfo AS STRING
DIM SHARED IdeContextHelpSF AS _BYTE
DIM SHARED host&
DIM SHARED IdeSystem AS LONG
'1=Entering text into the main IDE window

View file

@ -674,6 +674,14 @@ FUNCTION ide2 (ignore)
IF ideautorun THEN ideautorun = 0: GOTO idemrunspecial
END IF
STATIC attemptToHost AS _BYTE
IF vWatchOn = 1 AND attemptToHost = 0 THEN
IF host& = 0 THEN
host& = _OPENHOST("TCP/IP:9000")
attemptToHost = -1
END IF
END IF
IF c$ = CHR$(254) THEN
'$DEBUG mode on
idecompiling = 0
@ -5968,9 +5976,10 @@ FUNCTION ide2 (ignore)
END FUNCTION
SUB DebugMode
STATIC host&
DIM PauseMode AS _BYTE
_KEYCLEAR
SCREEN , , 3, 0
dummy = DarkenFGBG(1)
clearStatusWindow
@ -6040,6 +6049,7 @@ SUB DebugMode
'Waiting for line number...
a$ = "": b$ = ""
DO UNTIL INSTR(a$, endc$) > 0
k& = _KEYHIT
IF k& = 27 THEN
a$ = "free" + endc$
PUT #client&, , a$