Available Debugging Tools
Expo provides multiple debugging methods:| Tool | Purpose | Platform |
|---|---|---|
| Chrome DevTools | JavaScript debugging, console, network | All |
| React DevTools | Component hierarchy, props, state | All |
| Expo DevTools | Dev menu, inspector, plugins | All |
| Xcode Debugger | Native iOS code | iOS |
| Android Studio | Native Android code | Android |
| Network Inspector | HTTP requests/responses | All |
JavaScript Debugging
Chrome DevTools
The primary tool for debugging JavaScript code.1
Enable debugging
- Shake device or press
Cmd+D(iOS) /Cmd+M(Android) - Select “Debug with Chrome”
2
Open DevTools
Chrome opens automatically at:Or manually open Chrome and press
Cmd+Option+J (Mac) / Ctrl+Shift+J (Windows/Linux).3
Set breakpoints
app/index.tsx
Console API
Use console methods for debugging:Source Maps
Ensure source maps are enabled for readable stack traces:app.json
React DevTools
Inspect React component tree, props, and state.1
Install React DevTools
2
Start React DevTools
3
Connect to app
4
Inspect components
- Components tab: View component hierarchy
- Profiler tab: Measure render performance
- Select components to inspect props and state
- Edit props/state in real-time
Component Inspection
app/components/UserProfile.tsx
Performance Profiling
Network Debugging
Network Inspector
expo-dev-client includes a built-in network inspector.
1
Enable network inspection
Open dev menu and select “Network Inspector”.
2
View requests
See all HTTP requests:
- URL and method
- Status code and timing
- Headers and body
- Response data
3
Inspect request details
Network Debugging Tools
utils/api.ts
Proxying Requests
For debugging with tools like Charles or Proxyman:app.json
Element Inspector
Visually inspect and debug UI elements.1
Enable inspector
Shake device or press:
- iOS:
Cmd+D - Android:
Cmd+M
2
Inspect elements
Tap any UI element to see:
- Component name
- Props
- Styles
- Layout dimensions
- Position in hierarchy
3
Navigate hierarchy
Use breadcrumbs to navigate up the component tree.
Style Debugging
app/components/Card.tsx
Native Debugging
iOS with Xcode
Debug native iOS code and crashes.1
Open in Xcode
2
Set native breakpoints
ios/YourApp/AppDelegate.swift
3
View console output
In Xcode:
- View > Debug Area > Show Debug Area (
Cmd+Shift+Y) - See native logs and crashes
4
Debug memory issues
Android with Android Studio
Debug native Android code.1
Open in Android Studio
2
Attach debugger
- Run > Attach Debugger to Android Process
- Select your app process
- Choose “Java” debugger
3
Set native breakpoints
android/app/src/main/java/com/yourapp/MainApplication.kt
4
View Logcat
View > Tool Windows > LogcatFilter by your package:
Debugging Native Modules
When working with Expo modules:ios/Modules/MyModule/MyModule.swift
android/src/main/java/expo/modules/mymodule/MyModule.kt
Performance Debugging
Performance Monitor
Enable the performance overlay:- JavaScript frame rate
- UI frame rate
- Memory usage
- Views count
Profiling with Hermes
For better performance, use Hermes:app.json
React Native Performance
Troubleshooting
Debugger Won’t Connect
Source Maps Not Working
Performance Issues in Debug Mode
Debug mode is slower than production:Xcode: Process Launch Failed
Next Steps
DevTools
Explore Expo DevTools and plugins
Inspector
Use the element inspector
Error Handling
Handle errors and crashes
Testing
Set up automated testing