Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging React Native over adb tcpip

I'm trying to attach a USB device (using USB OTG) to my Android device while developing an app using React-Native. Classically to debug an Android app, one connects using USB debug mode over adb, but since my USB port is being used for my USB OTG device, that's not possible.

I tried to use the adb tcpip method (How can I connect to Android with ADB over TCP?) but that doesn't work because my device can't find the 'development server'. Has anyone had any luck debugging this way?

like image 454
TinyTheBrontosaurus Avatar asked Jul 06 '17 22:07

TinyTheBrontosaurus


People also ask

How do I debug on device React Native?

To connect your app with React Native Debugger, you need to run your app and start debug mode. To start debug mode, shake your mobile device or press Command + Shift + Z or Ctrl + M and choose the debug option.


1 Answers

Make sure your phone and the PC used for development are connected in the same LAN. From the Rage Shake menu (shake the device while your app's screen is active) you should be able to navigate to Dev Settings > Debug server host & port for device which lets you enter the IP & port of the development server for loading from the packager.

like image 159
gtfargo Avatar answered Sep 18 '22 07:09

gtfargo