As part of developing a cross-platform native mobile app with .NET MAUI, I’ve set up a workflow that leverages my virtualized development environment. My dev environment lives on a ProxMox cluster, which I access through a virtual machine devbox using Remote Desktop. This setup lets me resume work seamlessly from any location while taking full advantage of the ProxMox cluster I meticulously built.

While this infrastructure is powerful, it introduces a wrinkle: debugging mobile apps over USB is inconvenient when working remotely. To address this, I configured wireless debugging for my Android tablet, allowing me to test directly on a physical device without needing a USB connection to the VM.

Enabling Wireless Debugging on the Android Device

The first step in this setup takes place on the Android tablet itself. To begin, I enabled Wireless debugging, a feature hidden within the Developer options. Locating the correct screen proved tricky, but it’s essential for initiating the pairing process.

Within the Wireless debugging settings screen, the device displays its name, IP address, and a dynamic port number. There is also a button labeled Pair device with pairing code, which, when tapped, shows the necessary information to connect ADB from your workstation.

After completing the pairing process, my development workstation appeared under the list of Paired devices on the tablet. This confirmed that the device recognized the remote debugging connection.

Setting Up ADB in Visual Studio

To start working with ADB, I opened the ADB terminal in Visual Studio. You can find it under the Tools menu by selecting Android, then clicking on Android Adb Command Prompt….

Step 1: Pair the Device

Using the pairing code and network information displayed on the Android tablet, I executed the following command in the ADB terminal:

adb pair 192.168.1.82:33551

This established the initial handshake between my workstation and the tablet.

Step 2: Connect the Device

With the device successfully paired, I connected to it using:

adb connect 192.168.1.82:41067

ADB confirmed the connection, and running the adb devices command showed:

List of devices attached
192.168.1.82:41067      device
This confirmed that the device was recognized and ready for deployment.
Debugging in Visual Studio

After connection, the Android tablet appeared in Visual Studio under the Run dropdown menu, categorized under Android Local Devices. This allowed me to deploy and debug my .NET MAUI app wirelessly, directly from my remote VM environment.

Alt

Conclusion

Wireless debugging with an Android tablet has significantly improved my development experience, particularly given my virtualized and remote workflow.

By navigating the sometimes obscure device settings and setting up ADB correctly, I’ve streamlined my ability to test on real hardware without being tethered to USB connections. This method integrates perfectly with my ProxMox-based setup, letting me stay productive and agile.

Alt