Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

If, while a script is running, a runtime error occurs or a STOP statement is encountered, the BrightSign application will enter the BrightScript debug console. The debug console can be accessed via the BrightSign application console, which communicates over the primary serial port by default and can be accessed from a terminal program using a null-modem cable. The BrightSign application console can alternatively be routed over Telnet or SSH.

Accessing the Debugger

If you haven’t turned on script debug, any interruption to the BrightScript interpreter execution will not give access to the debugger but will instead reboot the player to attempt a clean execution.

Automatic Access

If, while a script is running, a runtime error occurs or a STOP statement is encountered, the BrightSign application will enter the BrightScript debugger.

Access at Bootup

You can also access the debug console at bootup:

  1. Power off the device. 

  2. Power on the device and wait between 5 and 15 seconds.

  3. Press and hold the SVC button on the side of the player.

  4. Wait until the BrightSign> prompt appears in the serial/Telnet/SSH terminal (which indicates that you are in the BrightSign Shell). You can now release the SVC button.

  5. Enter script at the prompt while in the BrightSign Shell. This will take you to the BrightScript debug console.

BrightScript Console

Console Scope

The console scope is set to the function that was running when the BrightScript debugger is invoked, either by choice or automatically. While in the console, you can type in any BrightScript statement; it will then be compiled and executed in the current context. If the interpreter has exited the running script, you can instead use the BrightSign shell command set.

Commands

The following console commands are currently available in the BrightScript debug console:

Command

Description

bt

Print a backtrace of call-function context frames.

classes

List all public classes.

cont or c

Continue script execution.

counts

List count of BrightScript Component instances.

da

Show disassembly and bytecode for this function.

down or d

Move one position down the function context chain.

exit

Exit the debug shell.

gc

Run the garbage collector and show collection statistics.

hash

Print the internal hash-table histograms.

last

Show the last line that executed.

methods <class>

List methods provided by specified class.

methods <class>.<interface>

List methods provided by the specified interface or class.

list

List the current source of the current function.

ld

Show line data (source records)

next

Show the next line to execute.

bsc

List all allocated BrightScript Component instances.

stats

Show statistics.

step or s

Step one program statement.

t

Step one statement and show each executed opcode.

up or u

Move one function up the context chain.

var

Display local variables and their types/values.

print or p or ?

Print variable value or expression.*

*BrightScript print messages are routed to the BrightSign application console, which is accessible via the primary serial port or Telnet/SSH, as noted above.


  • No labels