This example app demonstrates all features of @lokal-dev/react-native-bugbubble. It showcases automatic interception of console logs, network requests, and WebSocket events, as well as explicit logging capabilities.
- Node.js (check
.nvmrcin the root directory) - Yarn package manager
- For iOS: Xcode and CocoaPods
- For Android: Android Studio and Android SDK
Install dependencies from the root directory:
cd ..
yarnyarn example startyarn example iosThis will start Metro bundler (if not already running), build and launch the iOS app in the simulator.
yarn example androidThis will start Metro bundler (if not already running), build and launch the Android app in an emulator or connected device.
The example app includes four demo sections:
- 💬 Console Logs: Automatic console log interception and manual logging
- 🌐 Network Requests: Automatic network request interception and manual logging
- 🔌 WebSocket Events: Automatic WebSocket event interception and manual logging
- 📊 Analytics Events: Explicit analytics logging (analytics requires explicit logging)
Each section has buttons to:
- Trigger automatic interception examples
- Demonstrate explicit logging using
BugBubbleLoggerAPI
Tap the floating button (top-right corner) to open the debugger modal. You can drag it to reposition it.
The debugger includes:
- Tab Navigation: Console, Network, WebSocket, and Analytics tabs
- Search: Filter logs by searching for specific text
- Expandable Logs: Tap any log entry to see full details
- Network Details: View request/response headers, body, duration, and cURL commands
- Clear Functionality: Clear all logs or logs for a specific tab
- Metro bundler not starting: Ensure port 8081 is not in use
- iOS build fails: Run
cd ios && pod installfrom the example directory - Android build fails: Ensure Android SDK and emulator are properly configured
- No logs appearing: Make sure you've triggered some actions before opening the debugger
- WebSocket not connecting: Check your internet connection and firewall settings
For detailed documentation, API reference, and configuration options, see the main README.