How to debug your Android app over WiFI and say goodbye to cables
Tired on annoying cables? Me too. This is why I love to debug my apps over WiFi, no more cables around! It takes just few minutes to configure it and I’ve added a lot of images so the entire process should be straightforward!
What you need to do it: Requirements.
You don’t need too much to enable the wireless debugging, just:
- Android 11
- Android SDK 30 (if not already installed, you can install it using the Android SDK Manager in Visual Studio)
Do you have everything? Great! So let’s start.
On your phone go in Settings and then in Developer Options:

Enable Wireless ADB debugging and then Wireless debugging. Your phone should show you something like this (of course with data from your actual network):

Tap on Allow to confirm it then click on “Wireless debugging” and Android will show you this page:
Now click on “Pair device with pairing code“. Done? Perfect, now Android will show you a pairing code and the IP address like in this screen:
We are almost ready. Now it’s time to go on your computer. From Visual Studio you can open an Android Adb Command prompt (you can search for it like in the following image):
and write “adb pair” following by the IP and port that your phone showed earlier:
Press enter and your PC should ask you to insert the pairing code. Insert the code showed on your phone. If the code is correct you should receive the message: “Successfully paired to…”
I promise we have almost finished. Now that the device is paired, you need to connect it. To do so, in the same prompt, write “adb connect” followed by your IP and port (Don’t forget the port otherwise the connection will not happen…have a look at the image below).
If everything is correct, you should see the message “Connected to…“. DONE! Now if you go in Visual Studio you can find your new wirelessy connected device in the list of devices:
As you can see my OnePlus is right there ready to allow me to debug with wonderful Xamarin Android apps without any annoying cable. So now it’s your turn to debug your Xamarin apps for Android over WiFi!
Conclusion
It takes few minutes to pair and connect your phone and then finally you don’t need the cable anymore to debug your apps. How cool is that? As usual, if you have any questions, leave a comment here and I’ll quickly reply.
If you have enjoyed this guide, have a look at the others in the blog, there are really interesting articles!
August 11, 2022 @ 9:34 am
you have to check “stay awake” option in developer options
Cannot debug MAUI on my Android phone via WiFi – Ask Android Questions
February 21, 2022 @ 12:49 pm
[…] followed these instructions and could pair the device to my computer (it’s also listed on the phone now), but connecting […]
February 21, 2022 @ 11:59 am
Doesn’t work. I can pair but not connect. The error is “connection refused by the target computer”. Can’t find anything about it. The phone is still on/active. Using my home WLAN that otherwise works (can open local PC websites from the phone).
August 30, 2021 @ 12:44 pm
It doesn’t work if you are using the local hotspot.
August 28, 2021 @ 1:09 am
When the phone screen is closed, the connection is cut off. Is there a solution to that and there is also an option to pair the device using the QR code? Can it be used and if possible, how?