6.1-BrightScript Debug Console


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. You can also access the debug console at bootup by following these steps:

  1. Power on the device.
  2. Wait at least 5 seconds after the power LED (pwr) lights up.
  3. Use a paperclip or pen to press and hold the SVC button on the side of the player.
  4. Wait until the brightsign> prompt appears in the terminal.
  5. Enter brightsign> at the prompt. This will take you to the BrightScript debug console.

The debug console can be accessed from a terminal program using a null-modem cable connected to the RS-232, GPIO, or VGA port (depending on the player model). Networked players can also be accessed via Telnet or SSH.

The console scope is set to the function that was running when a runtime error or STOP statement occurred. While in the console, you can type in any BrightScript statement; it will then be compiled and executed in the current context.

In most cases, the debug console is the default device for the PRINT statement.

Console Commands

The following console commands are currently available:

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.

method <class>

List methods provided by specified class.

method <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.