I am new in react native. I want to see the logs of my react files. I am using android studio for using react-native project and genny motion as a simulator. Can you please guide me, how can I see the logs or enable android monitor in android studio?
Even I have already install react dev tools from Facebook for debugging the code: .html
but not able to get the particular solution
Already visit: How do you debug React Native?
How to do logging in React Native? I have checked so many solutions but it is not working in android 6.0 versions
But not working please guide me, Thanks in Advance
I am new in react native. I want to see the logs of my react files. I am using android studio for using react-native project and genny motion as a simulator. Can you please guide me, how can I see the logs or enable android monitor in android studio?
Even I have already install react dev tools from Facebook for debugging the code: https://facebook.github.io/react-native/docs/debugging.html
but not able to get the particular solution
Already visit: How do you debug React Native?
How to do logging in React Native? I have checked so many solutions but it is not working in android 6.0 versions
But not working please guide me, Thanks in Advance
Share Improve this question edited Jan 25, 2021 at 3:10 user10563627 asked Jul 26, 2017 at 6:46 MadhurMadhur 1,7725 gold badges23 silver badges40 bronze badges 1- if you want lighter solution you can run "react-native log-android" from your mand line, but its not as fancy as debug js remotely – Ganesh Cauda Commented Aug 2, 2017 at 9:03
3 Answers
Reset to default 7If you're using window, you can try hit CTRL+M, else in mac CMD+D to open debugging menu. Once it open, choose REMOTE JS DEBUGGING
, it will automatically open chrome browser for you to debug js error. Android studio debugging will work if you're connected on real device.
Eg. of Debugging Menu
I've found out the answer for genYmotion from How do you debug react-native?. Don't know whether it'll work for you, but worth for try.
For an Android App, if you're using Genymotion you can toggle the menu by pressing ctrl + m, but you may have to enable it in the menu by :
- Untick untick widget
- click on debug in chrome
Now i have resolved the issue with these above ments you can click
Ctrl + D and then click Ctrl + M for fetching the debugging contents
Then Run below mand for checking logs
React-native log-android
with this you will be able to see the console logs in android studio terminal log panel.
But before this you need to run mand:
Npm start
for checking latest changes by fetcing bundle directly in the simulator
Thank you
Instead of using simple console.log mand
Use Reactoron for Logging Data Here is the link: https://github./infinitered/reactotron
Best thing for log in React Native.