Raspberry BASIC

Author Topic: Remote Console Debugger  (Read 3663 times)

John Spikowski

  • Moderator
  • *****
  • Posts: 234
    • View Profile
    • ScriptBasic
Remote Console Debugger
« on: April 16, 2019, 05:10:03 PM »
This is an example of debugging a script with the console mode interactive debugger.

dbgcontest.sb
Code: Script BASIC
  1. a = 1
  2. b = "ScriptBasic"
  3. PRINT a,"\n"
  4. PRINT b,"\n"
  5.  


pi@raspberrypi:~/sbrpi $ scriba dbgcon.sb dbgcontest.sb
Application: ScriptBasic Remote Debugger
Version: 1.0
Source-File-Count: 1
Source-File: dbgcontest.sb
Current-Line: 1
-> l 1-
 [0001] a = 1
 [0002] b = "ScriptBasic"
 [0003] PRINT a,"\n"
 [0004] PRINT b,"\n"
Current-Line: 1
-> s
Current-Line: 2
-> b4
Message: done
Current-Line: 2
-> r
1
Current-Line: 4
-> G
Global-Variable-Name: main::a
Global-Variable-Value: 1
Global-Variable-Name: main::b
Global-Variable-Value: "ScriptBasic"
Current-Line: 4
-> r
ScriptBasic
Debug session closed.
pi@raspberrypi:~/sbrpi $


Place the sdbg.so in your /usr/local/lib/scriba directory.
The dbgcon.sb script should be in the same directory as the script you're debugging.
« Last Edit: April 18, 2019, 03:11:07 AM by John Spikowski »
ScriptBasic Project Manager/Facilitator