Lesson 18 of 20Article14 min
Debugging & DevTools
Debugging & DevTools
Finding and fixing bugs
- Metro terminal — redbox shows JS errors with stack trace; tap to open.
- React Native DevTools — press j in Metro or shake device → Debug.
- Flipper / Reactotron — network inspector, AsyncStorage viewer, layout.
- console.log — works in Metro terminal; remove before production.
- React DevTools — inspect component tree and props.
Common issues and fixes
- Red screen 'Unable to resolve module' — wrong import path or missing npm install.
- White screen — silent JS error; check Metro logs.
- Network request failed on Android emulator — use 10.0.2.2 instead of localhost.
- Pod install errors — cd ios && pod deintegrate && pod install.
- Clear cache: npx react-native start --reset-cache.
Android emulator localhost
iOS Simulator: http://localhost:3000/api
Android Emulator: http://10.0.2.2:3000/api
Physical device: http://YOUR_LAN_IP:3000/api