简体   繁体   中英

Debug React Native App from Visual studio Emulator for Android

I am running my React Native app in Visual Studio Emulator for Android. Can someone tell me how can i debug my js code ? In Android studio simulator we have options to remote debug. But from Visual studio Emulator how can i debug..Thanks in Advance.

If you have chrome installed, then you can use the chrome debugger to debug your js code. First Mac: command + M Window: control + M Then click debug js remotely; It will open a tab in chrome, then right click and select inspect, switch to the console tab. Any statement you console will appear there.

There are two ways you can debug your code.

First one : Using visual studio debug menu.

  • Press ctrl+shift+D to open up debug menu and select Attach to Packager or select 4th item on the left in visual studio.

This allows you to set break points and debug code as you see in Android Studio.

Second one : Using React Native Debugger

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