reactjsreact-nativedebuggingnativebreakpoints

How to debug with breakpoints in React Native


Please help me how to debug in react native with breakpoints, I found only solution for android real devices, but unable to debug with android emulator and iOS simulator.


Solution

    1. Install React Native Debugger tool
    1. Quit Google Chrome if it already running.
    2. Launch the React Native Debugger app from Applications folder.
    3. Activate iOS simulator and Run command+d using keyboard. In the debug menu select “Debug JS Remotely” option.
    4. Go to React Native Debugger. Select ‘Toggle Developer Tools’ sub menu item from ‘View’ menu.
    5. Select Sources tab (in the React Native Debugger window).
    6. In the left side menu, expand RNDebuggerWorker.js and expand sub option localhost:****. You will see the project root folder.
    7. Select a .js file and add break point. Break point will get activated when the respective line is executed.
    8. You can see the console logs in the console area at the bottom.