Wireless debugging for an Android, Flutter or React Native Developers

Hitesh Dhamshaniya
4 min readApr 21, 2022

--

While we are working on android applications development, we need to test and debug apps using a USB cable to connect the device to android studio. With the decreasing number of computer ports, for which we require an external dongle device to connect USB cables. Using remote debugging (wireless/wi-fi debugging) saves a lot of time and space needed to carry external accessories used to debug a mobile application on an android device.

In this article, I will be explaining how to set up remote debugging for an android application over the network using Android Studio and an Android device.

Note: This is not limited to testing a native android application but also for react native and flutter applications.

Required Tools

Steps to setup

Now, we have all the tools setup, we can go ahead to open our android project in android studio and follow the steps below;

On the android test device

We should ensure the Developer Options is enabled, In developer options, an option for Wireless debugging should be toggled off by default, it should be toggled on

Tapping on the enabled wireless debugging should get you options to connect wirelessly

In android studio

We should click on the dropdown to select a device at the top-right menu bar,

That should give a popup dialog that provide a default option to Pair using a QR code

-> Pairing using QR code

On the mobile device already been setup above, we click on the option to Pair device with QR code which gives a QR scanner screen to scan the QR generated by the android studio

Once scanned correctly, we get a successfully paired status and would see the new paired devices under the list

-> Pairing using pairing code
On the mobile device already been setup above, we click on the option to Pair device with pairing code to generate a pairing code that would be used to finish the pairing set-up.

In the android studio, we should toggle the Pair using pairing code option in the popup dialogue, we should see our device ready to start pairing

Input the code generated on the mobile phone into the fields on the android studio

Once scanned correctly, we get a successfully paired status and would see the new paired devices under the list

Either way we go about pairing the device, once done we should see our device available for the app to run on anytime we are connected to the same network 🎉

Debugging issues

  • Can’t see developer options? How to toggle developer options on a new device: Go to phone settings -> Scroll to the bottom and click on the about phone option -> Click on software information -> Tap on the Build number 7 times to get a prompt that developer options have been enabled.
  • Can’t see the device to pair with? Confirm if the android device and system running the android studio are connected to the same network.

Conclusion

Using remote debugging generally saves a lot of time to debug mobile applications, Hopefully, it will save your time.

Thanks for reading 🥳

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Hitesh Dhamshaniya
Hitesh Dhamshaniya

No responses yet

Write a response