Nonstop Brightscript SDK
Prerequisites
- A Roku Device setup and connected to the same network as your PC
- Node 10+
Local Development
- Follow the Developer Setup Guide from Roku, noting your Device IP, Device Username and Device Password
- In the build folder in the repo, create a file called
local-config.jswhich contains the following:
exports.deviceIp = '[DEVICE IP FROM STEP 1]';
exports.deviceUser = '[DEVICE USERNAME FROM STEP 1]';
exports.devicePassword = '[DEVICE PASSWORD FROM STEP 1]';
- From the root of the project, run
npm install - From the root of the project, run
gulp. This will:- Copy the Nonstop SDK files into the demo app
- Zip the demo app ready for deploy to the Roku device
- Remove any previously installed versions of the Demo App from the device
- Install the latest version to the device
Debugging
Learn more about debugging from the Developer Debugging Guide
Enable Telnet
Ensure you have telnet enabled in Windows.
- Windows Key
- Search for
Turn Windows Features on and off - Select
- Scroll to Telnet
- Ensure Checked
Telnet To Device
- Open a console window
- Type
telnet roku-ip-address 8085
When connected you can use the following commands:
brkd- Toggle whether BrightScript should break into the debugger after non-fatal diagnostic messagesbsc- Print current BrightScript component instancesbscs- Print a summary of BrightScript component instance counts by component typebt- Print backtrace of call function context framesclasses- Print BrightScript component classescontorc- Continue script executiondownord- Move down the, function context chain oneexit- Exit shellgc- Run garbage collectorhelp- Print the list of BrightScript console commandslastorl- Print the last line that executedlist- List current functionnextorn- Print the next line to executeout- Step out of a functionover- Step over a functionprint,p, or?- Print a variable or expressionstep,s, ort- Step one program statementthread <ID>orth <ID>- Select a suspended thread to debug - all following debug commands will execute within that threadthreads <ID>orths <ID>- List all current executed suspended threadsuporu- Move up the function context chain onevar- Print local variables and their types/values