I added to the dbgcon (client remote debugger) the ability to pass the IP and port if not using the default.
' ScriptBasic Remote Console Debugger
cmdln = TRIM(COMMAND())
IF cmdln = "" THEN
' Default IP:Port
OPEN "127.0.0.1:6647" FOR SOCKET AS #1
ELSE
OPEN cmdln FOR SOCKET AS #1
END IF
WHILE NOT EOF(1)
LINE INPUT #1, dbgs
IF dbgs = ".\r\n" THEN
PRINT "-> "
LINE INPUT dbgc
PRINT #1, dbgc
IF CHOMP(dbgc) = "q" THEN GOTO Done
ELSE
dbgcmd = CHOMP(dbgs)
' l - List Source
IF LEFT(dbgcmd,13) = "Break-Point: " THEN
IF MID(dbgcmd,14,1) = "0" THEN
PRINT " "
ELSE
PRINT "*"
END IF
GOTO IT
END IF
IF LEFT(dbgcmd,13) = "Line-Number: " THEN
PRINT FORMAT("%~[0000] ~",VAL(MID(dbgcmd,14)))
GOTO IT
END IF
IF LEFT(dbgcmd,6) = "Line: " THEN
PRINT MID(dbgcmd,7),"\n"
GOTO IT
END IF
' Unprocessed out
PRINT dbgs
END IF
IT:
WEND
Done:
PRINT #1,"q\n"
PRINT "Debug session closed.\n"
jrs@laptop:~/sb/test$ scriba dbgcon.sb 127.0.0.1:6666
Application: ScriptBasic Remote Debugger
Version: 1.0
Source-File-Count: 1
Source-File: dbgcontest.sb
Current-Line: 2
-> l -
[0001] REM DBGLISTEN 127.0.0.1:6666
[0002] a = 1
[0003] b = "ScriptBasic"
[0004] PRINT a,"\n"
[0005] PRINT b,"\n"
Current-Line: 2
->