简体   繁体   中英

How to run and debug React Native Android App in VSC?

I currently need to use the following steps to run and debug React Native Android App using Android Studio and Google Chrome:

  1. Start up Android Studio
  2. Setup emulator
  3. Go to terminal, run npm start
  4. Choose the desire flavour
  5. Run the emulator
  6. Remote debug in Chrome

I wonder if life can be made easier to use Visual Studio Code (possibly with some official plugin) to do all the above in a single click? Please list out the steps to configure it.

Debug react native android and ios app using Visual code, We need to add addition plugin into VSC React native-Full Pack

Step 1.

Install React Native - Full Pack extension

Step 2.

Connect the mobile device using USB debugging mode or open emulator from the android studio.

Step 3.

Click on debugging option from the left menu in visual code studio Click on Add configuration and select React Native then create launch.json

Step 4.

Open dev option in the phone on the long back press or shake the phone and Enable Debug js remotely

Step 5.

Final step click on play button and select Debug android or Debug ios

For more information refer this link

https://medium.com/@tunvirrahmantusher/android-debug-with-vscode-for-react-native-96f54d73462a

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