Multiple tools are available for debugging Cloud Apps. These debugging tools provide access to the runtime environment, crash logs, stack traces, and more.
The BrightScript Console shows the output of your Client during runtime.
If the Client crashes, the BrightScript Console displays the line number of the error, as well as the contents of variables at the time of the crash.
Compilation errors (such as
Syntax Error) are also displayed here.
To catch possible startup errors, keep the BrightScript Console open whenever you side-load the client.
To access the BrightScript Console, open a terminal window and run:
telnet <Roku device IP address> 8085
The BrightScript Console shows:
To display custom logs in the BrightScript Console, you must copy and modify a BrightScript client file.
You can find the BrightScript client files in the
Make sure to preserve the original folder structure.
If you copy a file from the
~/youiengine/<version>/src/cloud/source folder, paste it in
To add custom logs:
Make a copy of
main_implementation.brs for editing.
Open a terminal window and run the following commands from your
mkdir source cp ~/youiengine/<version>/src/cloud/source/main_implementation.brs ./source
Add a custom log to
There are multiple ways to print logs from BrightScript. You can use any of the following statements:
logMessage("Log message") print "Log message" ? "Log message"
It’s good practice to set identifiers before the actual log contents (for example,
POR123: Log message).
A unique string makes searching the logs easier.
Side-load the client to your Roku device.
youi-tv roku-client -l -s <Roku device IP address> -u rokudev:<password>
The BrightScript Debug Shell is an interactive debugging tool. It provides features and utilities such as:
To access the BrightScript Debug Shell, open a terminal window and run:
telnet <Roku device IP address> 8080
See a full list of commands in the Roku Developer Documentation.
<App_Name> application Error, the client is likely unable to connect with the server.
hostis the Server IP address.
hostin the client manifest file.
If elements are missing from your scene export, try quitting the Client (with the home button) and then relaunching it. On the server side, this results in a re-export of the scene to the client. If the problem is fixed, the list likely wasn’t ready and visible when the scene was exported.
source/focus.brsand uncomment the debug output in