Fix Debugging Issues
This page helps you resolve common issues that occur when debugging Vega apps with Vega Studio. If you don't find a solution to your specific problem here, post an issue in Developer Forum for additional support.
App terminates unexpectedly while debugging, interrupting the debugging session
Cause: The Lifecycle Manager (LCM) terminates apps that don't send heartbeat signals. Breakpoints pause your app, preventing heartbeats, causing termination.
Solution: Verify your device supports timeout disabling.
-
From the device's shell, run:
vlcm --help
-
Look for the
--disable-app-timeout
flag in the debug command output.Warning: If you don't see the--disable-app-timeout
flag, update your SDK and check for OS updates. -
Prevent app termination using one of these options:
Option 1: Using Vega Studio (Recommended)
a. Open your launch.json file. b. Add or modify the
disableAppTimeout
setting totrue
:{ "name": "(script) Launch", "type": "kepler", "request": "launch", "disableAppTimeout": true }
c. Save and restart your debugging session.
Warning: This only works withLaunch
requests, notAttach
requests. For attach debugging, use the CLI method.Option 2: Using Vega CLI
a. Disable timeouts for your component:
vlcm debug <component-id> --disable-app-timeout
b. Launch your app:
kepler device launch-app --appName <component-id>
c. Attach your debugger in Vega Studio.
-
Re-enable timeouts after debugging using one of these options:
- Vega Studio: Launch app normally (without debug configuration)
- Vega CLI: Run
vlcm debug <component-id> --clear
then relaunch app
For information about launching your app, see Run Your App.
Example template for launching and debugging Vega and Turbo Module apps:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(script) Launch",
"type": "kepler",
"request": "launch",
"keplerMode": "debug",
"cwd": "${workspaceFolder}",
"deviceId": "${command:kepler.state.getSelectedDeviceId}",
"disableAppTimeout": true,
"perf": {
"startActivityMonitoring": false
}
},
{
"name": "(native) Launch",
"type": "keplerNative",
"request": "launch",
"cwd": "${workspaceFolder}",
"deviceId": "${command:kepler.state.getSelectedDeviceId}",
"disableAppTimeout": true
}
]
}
GDB Native Debugging Error: liblzma.5.dylib Not Found
Error:
{Starting: "/usr/local/bin/gdb" --interpreter=mi
dyld[57162]: Library not loaded: /usr/local/homebrew/opt/xz/lib/liblzma.5.dylibReferenced from: <5BAC9301-8CA6-3EA3-9537-CD0E961C0FAB> /usr/local/bin/gdbReason: tried: '/usr/local/homebrew/opt/xz/lib/liblzma.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/homebrew/opt/xz/lib/liblzma.5.dylib' (no such file), '/usr/local/homebrew/opt/xz/lib/liblzma.5.dylib' (no such file)"/usr/local/bin/gdb" exited with code 134 (0x86).ERROR: Unable to start debugging. Unable to establish a connection to GDB. }
Cause: GDB can't find the required XZ compression library (liblzma.5.dylib) which is a dependency for native debugging.
Solution: Install or reinstall the XZ library:
-
Install XZ library:
brew install xz
-
If already installed, try reinstalling:
brew reinstall xz
-
Verify symbolic links:
brew link xz
If the problem persists, try these additional steps:
-
Clear Homebrew cache:
brew cleanup
-
Update Homebrew:
brew update && brew upgrade
Additional considerations
- Latest version of Homebrew installed.
- Some macOS versions might require additional security configurations for GDB.
- Necessary permissions to access the library locations.
Related topics
- Perform Line-by-Line Debugging with Vega Studio
- Use Chrome DevTools for App Profiling
- Monitor Network Traffic with Charles Proxy
Last updated: Sep 30, 2025