The BrightScript VS Code Extension can deploy apps directly to the BrightScript Simulator and attach the debugger for a fast authoring loop. This guide shows how to connect the tools and prepare a reusable debug configuration.
- BrightScript Simulator installed and running; it can be on another machine reachable over the network.
- BrightScript VS Code Extension installed in VS Code.
- A Roku/BrightScript project opened in VS Code with a
manifestfile at its root.
- Launch the BrightScript Simulator desktop application.
- Open the Settings Screen.
- In the Services section, confirm the services are enabled (all checkboxes marked) for App Installer (Web), ECP, and Remote Console (Telnet).
- If you change the Application Installer port or the password, make sure you restart the service (unmark and remark the checkbox) and take note the new values—you will use them in the
launch.jsonconfiguration (section below). - Keep the simulator running; the VS Code debugger connects to it over the configured ports.
Important
On Linux systems, due to OS restrictions, the Installer service can not be started on port 80, so the service is disabled by default. To enable it, you must specify a different port.
- In VS Code, open the Run and Debug view and choose create a launch.json file.
- Pick BrightScript as the environment. VS Code creates (or updates)
.vscode/launch.jsonin your workspace. - Replace the generated configuration (or add a new entry) with the example below, adjusting folders or ports to match your project. The highlighted settings are required for the simulator integration.
{
"version": "0.2.0",
"configurations": [
{
"name": "BrightScript Debug: Launch",
"type": "brightscript",
"request": "launch",
"host": "${promptForHost}",
"packagePort": 80,
"password": "${promptForPassword}",
"rootDir": "${workspaceFolder}",
"files": [
"manifest",
"source/**/*.*",
"components/**/*.*",
"images/**/*.*"
],
"enableDebugProtocol": false,
"rendezvousTracking": false
}
]
}hostshould point to the simulator's IP address; uselocalhostwhen the simulator runs on the same machine.packagePortoptional, must match the Application Installer service port configured in the simulator (default80).passwordshould match the developer password set in the simulator (defaultrokudev).rootDirshould point to your project's root folder containing themanifestfile.filesshould include all source files and assets needed for your app.enableDebugProtocolandrendezvousTrackingmust be set tofalsefor compatibility with the simulator.
- Build and package your project using VSCode BrightScript Extension by pressing
F5or the play button on the Run and Debug view. - VSCode installs the latest build to the simulator, launches the channel, and attaches the debugger. Set breakpoints and inspect variables as usual.
- Connection refused: Verify the simulator is running and that the installer port in
launch.jsonmatch the simulator settings. - Upload failures: Confirm the Application Installer service is enabled and the password matches the simulator configuration (default
rokudev). - Debugger stops immediately: Ensure you disabled
enableDebugProtocolandrendezvousTracking; the simulator does not support those options beingtrue.