Connecting to port 9000 to run debug in Visual Studio

Error Message: “Failed to connect to Roku at (IP ADDRESS) on port 9000. Make sure you have the on device component running on your Roku.” Has anyone came across this issue?

This happens when you’re trying to use one of the panels such as “SceneGraph Inspector” in VSCode. Those panels work by having a small scenegraph “on-device-component” running inside your app. Right below that error, there should be instructions on how to enable that functionality.

  1. Set “injectRdbOnDeviceComponent”: true in .vscode/launch.json
  2. Add the following comment in main.brs after calling screen.show(): ’ vscode_rdb_on_device_component_entry