Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
Learn how to debug Vega apps and Turbo Modules with Vega Studio through GDB (GNU Debugger). Vega Studio provides built-in debugging capabilities that use GDB for native code debugging, allowing you to inspect running programs, set breakpoints, and step through code execution. Turbo Modules are native code components that extend React Native functionality. For Chrome DevTools debugging, see Use Chrome DevTools for App Profiling.

Prerequisites

Before you can debug apps with Vega Studio, complete these setup requirements to ensure your development environment and target devices are properly configured.
  1. (Optional) Review the VS Code debugging documentation.
  2. (Optional) Learn about GDB (GNU Debugger).
  3. Choose your debugging target: Vega Virtual Device or Fire TV Stick.
  4. Enable developer mode for your target: Vega Virtual Device
    1. Open VS Code.
    2. Select the Vega Studio extension icon from the activity bar.
    3. Navigate to Devices.
    4. Start the Vega Virtual Device.
    5. Open a terminal and run:
    Fire TV Stick
    1. Connect your Fire TV Stick to your development machine through USB.
    2. Enable developer mode following Run your app on Fire TV Stick.

Configure the Vega Studio debugger

Set up debugging configurations to specify how Vega Studio should launch and connect to your app. You can use automatic configuration for quick setup or manual configuration for custom debugging scenarios.

Automatic configuration

  1. Open your project file or select it from the sidebar.
  2. Choose Run and Debug from the VS Code activity bar. Screenshot of the Run and Debug option in the VS Code activity bar.
  3. Select the debugger type:
    • Vega: For React Native for Vega apps (JavaScript/TypeScript code)
    • Vega Native: For Turbo Modules (native C++ code)
    Screenshot of the automatic debug configurations where you can select a debugger. The debugger attaches to the running app.
  4. Follow the steps in Debug your app.

Manual configuration

  1. Go to Run and Debug in the VS Code activity bar.
  2. Click create a launch.json file.
  3. Select a project from the prompt (skip if you only have one project).
  4. Select the debugger type:
    • Vega: For React Native for Vega apps (JavaScript/TypeScript code)
    • Vega Native: For Turbo Modules (native C++ code)
Vega Studio creates a launch.json file with default configuration.

Specify your target device

When multiple devices are connected, specify your target device by setting the deviceId property:
  • "${command:kepler.state.getSelectedDeviceId}" - Uses device selected from the sidebar
  • "KeplerVirtualDevice" - Targets Vega Virtual Device specifically
  • Device serial ID - Targets specific physical device

Add configuration to launch.json

To add additional configurations to an existing launch.json file:
  1. Open your app’s launch.json file.
  2. Select the Add Configuration button.
  3. Choose your desired launch target from the available options.
  4. Save your changes. Screenshot that shows the adding of debug configurations to the launch.json file.

Set up breakpoints

Create breakpoints in your app by clicking in the left margin of the code editor next to line numbers. Screenshot showing the setting of a breakpoint in the VS Code editor.

Launch.json attributes

Sample configurations

Basic React Native for Vega app
Multi-device React Native for Vega app
Hybrid React Native and Turbo Module debugging

Configuration snippets

Debug your app

Once you’ve configured your debugger and set up breakpoints, start debugging your app on your chosen target device. The debugging process is similar for both devices, with device selection being the main difference.

Debug on Vega Virtual Device

  1. Select Virtual Device from the sidebar.
  2. Go to Run and Debug.
  3. Select the (script) Launch config from the dropdown.
  4. Click the play icon or press F5.
Vega Studio packages, loads, and executes your app on the Vega Virtual Device. When execution hits a breakpoint, VS Code enters debug mode and displays the Debug Toolbar. Screenshot showing the VS Code debug mode with Debug Toolbar and an active console.

Debug on Fire TV Stick

  1. Select Fire TV Stick as your target.
  2. Go to Run and Debug.
  3. Select the (script) Launch config from the dropdown.
  4. Click the play icon or press F5.
Vega Studio packages, loads, and executes your app on the Fire TV Stick. When execution hits a breakpoint, VS Code enters debug mode and displays the Debug toolbar.

Debug toolbar actions

The debug toolbar contains actions you can perform during a debugging session. Screenshot showing the debug toolbar controls for stepping through code execution in VS Code.

Troubleshooting

For debugging issues, see Fix Debugging Issues.
Last modified on April 29, 2026