How do I debug on a real Android device using Xamarin for Visual Studio?

I’m using Visual Studio 2017 with a OnePlus.

In order get debugging working I did the following.

  1. Go to Settings > About phone and tap Build Number repeatedly until developer mode is enabled
  2. Go into Settings > Developer options and turn USB debugging ON
  3. Connect you phone to your PC via USB. I had to plug my phone into my PC’s onboard USB port, not my USB hub as this did not work
  4. You should be prompted to trust your PC (trust it)
  5. Fire up Visual Studio
  6. Open your solution and your device should now be available.

Side note: I have noticed that sometimes it also depends on the cable you use. If you still have no luck, perhaps try another cable.

Leave a Comment