简体   繁体   中英

How to debug react-native in Android Studio

I am coding React-native in Android Studio for Windows and using the Emulator. I have no idea how to debug my code?

How can I console.log in the code and see the results? How can I inspect elements? How can I put a break point in the code?

Any suggestion on the tools/tutorial will be a great help.

Thanks Negin

  1. Mark near line no. from where you want debug
  2. Debug the project which shows beside the run icon.
  3. Perform your Ui task where perform your debug line(it will shows mark near line number when it calls)
  4. You can move the line up and down from debug console.

Here is the official document for debugging: Doc

You can debug the code in Chrome

TLDR: watch the video starting at 19:9.

  1. install fbflipper from the link .
  2. install openSSl from here or if you have chocolatey type choco install openssl
  3. add Path veriable locating where you have installed openssl medium article link
  4. enable hermes ( link )
  5. best of luck.

Flipper allows you to debug app easily

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM