From f204d5685b7e1b2e3d54957f9cd9b8c8e2f7fa05 Mon Sep 17 00:00:00 2001 From: Fellippe Heitor Date: Mon, 12 Jul 2021 12:54:23 -0300 Subject: [PATCH] Attempts to become host when $DEBUG is first detected. Instead of waiting for F5. --- source/ide/ide_global.bas | 1 + source/ide/ide_methods.bas | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/ide/ide_global.bas b/source/ide/ide_global.bas index cdc8d64a2..eda790969 100644 --- a/source/ide/ide_global.bas +++ b/source/ide/ide_global.bas @@ -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 diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 80cf3e556..08ec2b8b0 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -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$