Debug React Native App from Visual studio Emulator for Android

896 views Asked by At

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.

2

There are 2 answers

5
packability On

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.

3
Vivek_Neel On

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