Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you debug React Native?

How does one debug their React code with React Native while the app is running in app simulator?

like image 984
McG Avatar asked Mar 26 '15 21:03

McG


People also ask

How do I debug an app in React Native?

You can also use the ⌘D keyboard shortcut when your app is running in the iOS Simulator, or ⌘M when running in an Android emulator on Mac OS and Ctrl+M on Windows and Linux. Alternatively for Android, you can run the command adb shell input keyevent 82 to open the dev menu (82 being the Menu key code).

How do you debug in react?

When debugging a React app, I often find breakpoints to be very helpful. There are two main ways in which we can use them: By writing the debugger statement in our source code. By clicking on a specific line of the code in the Chrome web browser (or Firefox, Edge, etc.)


1 Answers

Cmd+D from within the Simulator. It'll popup Chrome and from there you can use the Developer Tools.

Edit:

This is now linked in the help docs.

like image 117
xanadont Avatar answered Sep 30 '22 13:09

xanadont