react-native

Debugging

Syntax#

  • debugger;

Start Remote JS Debugging in Android

You can start the remote debugging from Developer menu. After selecting the enable remote debugging it will open Google Chrome, So that you can log the output into your console. You can also write debugger syntax into your js code.

Using console.log()

You can print log message in the terminal using console.log(). To do so, open a new terminal and run following command for Android:

react-native log-android

or following command if you are using iOS:

react-native log-ios

You will now start to see all the log message in this terminal


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow