Appendix – brightscript debug console – BrightSign BrightScript 2 Reference Guide User Manual
Page 51

51
GetAttributes() and GetText() are similar to calling xmllist.Simplify().GetText(),
xmllist.Simplify().GetAttributes().
Appendix
– BrightScript Debug Console
When a script is running, if a runtime error is encountered, or the “stop” statement is
encountered, the BrightScript debug console is entered. Access to the console is device
specific. For example, in WinBrightScript, it is a separate window. On BrightSigns, it is
the main serial port (connect it to a PC with a null-modem cable and use a terminal
program).
Use the “help” command to get a list of commands you can use. For example, “var” will
list all in scope variables and their types and values. The Scope is set to the function that
was running when the error was encountered.
One of the most powerful things you can do at the debug console is to type in any
BrighScript statement. It will be compiled and execute in the current context.
Typically the default device (or window) for the “print” statement, and the debug
console, are the same.
As of this writing, the following debugger commands are available:
bt Print backtrace of call function context frames
bytecode Show bytecode for this function
classes List public classes
cont or c Continue Script Execution
down or d Move down the function context chain one
gc
Run garbage collector and show stats
exit Exit debug shell
last Show last line that executed
list List current function‟s source
next Show the next line to execute
objects List all allocated Roku Object instances
stats
Show statistics
step or s Step one program statement
up or u Move up the function context chain one
var Display local variables and their types/values
print or ? Print variable value or expression