Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make console.log work in react native for android [closed]

Any pointers on how to see console logs while developing android application using react native would be very appreciated.

like image 955
Gagandeep Singh Avatar asked Dec 08 '22 00:12

Gagandeep Singh


2 Answers

You can see the log by opening a terminal and entering the following command:

adb logcat *:S ReactNative:V ReactNativeJS:V

This will show all React Native logged statements on any connected devices or emulators.

like image 137
John Shammas Avatar answered Dec 11 '22 09:12

John Shammas


In the android emulator, open the app and press F2, then click Debug in Chrome. That should fire up a new window in Chrome, hit F12 in that window to open up dev tools and you'll see the logs in the console.

like image 31
Arsh Singh Avatar answered Dec 11 '22 08:12

Arsh Singh