How i can debug my xamarin forms application in my physical device over wi-fi?

Viewed 871

I have a virtual machine that i run with rdp in my local pc. I'm developing a xamarin forms app in visual studio in that virtual machine. So I would debug the app in my psysical device. I tried with adb but it don't work cause I can't connect my device via usb to virtual machine. Any ideas??

2 Answers

Google just updated this from Android 11 onwards, so for any one using a newer device, you can follow these steps to setup your device to build and debug wirelessly using your wifi connection:

  • On your Android 11 device, go to your Settings -> Tap on Advanced and go to the Developer options.
  • Then tap on Wireless Debugging switch, and always allow wireless debugging for your personal wireless network in the popup dialog
  • Then tap on the Wireless Debugging option and select “Pair device with pairing code” and it will give you a 6 digit code and IP address as you can see in the image
  • There are many ways of doing pairing the phone to your computer. For the simplest one, inside Visual Studio, go to Tools -> SDK Command Prompt and type the IP address and port from your phone above into the terminaladb pair {ipaddress}:{port}.
  • Then take the IP Address and port from the last screen and enter the following command adb connect {ipaddress}:{port}.

There’s a lot more details in this article Including limitations and a comparison with the iphone wireless debug feature

Related