How to debug with breakpoints in React Native
- Install React Native Debugger tool
- brew update && brew cask install react-native-debugger
- brew cask reinstall react-native-debugger
- Quit Google Chrome if it already running.
- Launch the React Native Debugger app from Applications folder.
- Activate iOS simulator and Run command+d using keyboard. In the debug menu select “Debug JS Remotely” option.
- Go to React Native Debugger. Select ‘Toggle Developer Tools’ sub menu item from ‘View’ menu.
- Select Sources tab (in the React Native Debugger window).
- In the left side menu, expand RNDebuggerWorker.js and expand sub option localhost:****. You will see the project root folder.
- Select a .js file and add break point. Break point will get activated when the respective line is executed.
- You can see the console logs in the console area at the bottom.
How do I debug React Native native module in android studio?
Finally I found a way:
- Start process like normal
- In android studio, press the button to attach debugger to a running app.
And that's it!
See: https://developer.android.com/studio/debug/index.html#attach-debugger to know which button I meant.
Why does React Native app crash when clicking on debug in Android emulator?
I have faced same issue and it was due to the 'react-native-reanimated' package (It's mentioned in their documentation that remote debugging is no longer possible for react-native-reanimated : React Native Reanimated Known problems and limitations) and the solution is to use flipper to debug : Debugging React Native apps with Flipper
Related Topics
Vertical Line Using Xml Drawable
Android 5.0 Material Design Style Navigation Drawer for Kitkat
Disable Logcat Output Completely in Release Android App
One Activity and All Other Fragments
How to Use Holo.Light Theme, and Fall Back to 'Light' on Pre-Honeycomb Devices
Android Share Intent for a Bitmap - Is It Possible Not to Save It Prior Sharing
Recyclerview Gridlayoutmanager: How to Auto-Detect Span Count
How to Set Text Size of Textview Dynamically for Different Screens
How to Get Current Date in Android
Android Install APK with Intent.View_Action Not Working with File Provider
Upload a File Through an Http Form, via Multipartentitybuilder, with a Progress Bar
How to Format Datetime in Flutter
How to Pass Multiple Primitive Parameters to Asynctask
Asynctask and Error Handling on Android