Errors automatically appear in your terminal where you ran npm start
- Look at the terminal where Metro bundler is running
- All errors, warnings, and console.logs from your phone will appear there
- Errors are shown in RED
- Warnings are shown in YELLOW
Example:
ERROR Warning: Cannot read property 'map' of undefined
ERROR TypeError: undefined is not an object (evaluating 'lessons.map')
- When Metro bundler starts, you'll see a QR code
- Press
jin the terminal to open the debugger - OR open this URL in your browser:
http://localhost:19002 - You'll see:
- Logs
- Errors
- Network requests
- Performance metrics
-
Install React Native Debugger (optional):
# Download from: https://github.com/jhen0409/react-native-debugger/releases -
Enable Remote JS Debugging:
- Shake your phone (or press
Cmd+Don iOS simulator /Cmd+Mon Android) - Select "Debug" or "Open Developer Menu"
- Tap "Debug" or "Debug with Chrome"
- Shake your phone (or press
-
Open Chrome DevTools:
- Go to
chrome://inspect - Click "inspect" under your device
- Go to
The app now has an Error Boundary that will:
- Catch errors and display them on screen
- Show error details
- Log errors to console (visible in Metro terminal)
Add this to see more details:
// In your component
console.log('Debug info:', yourData);
console.error('Error details:', error);All console.log/error statements appear in the Metro terminal!
✅ Always check your Metro terminal first - it shows everything
✅ Errors appear in RED in the terminal
✅ Press r in terminal to reload and see new errors
✅ Press j in terminal to open debugger in browser
✅ Shake your phone to open developer menu
r- Reload appj- Open debuggerm- Toggle menuCtrl+C- Stop Metro bundler
The easiest way: Just look at your terminal where npm start is running! All errors appear there automatically. 🎯