How to debug an Android application in Visual Studio using USB debugging?


I’ve been trying for a while to debug my Android build using USB debuggin with Visual Studio to no avail. I can deploy the build from the editor (Development Build + Script Debugging checked.

Note: Wifi debugging works properly. It’s USB debugging that I am unable to make work.

I can launch the profiler and connect it to the device, ADB sees it as well and it is listed in the connected devices but for some reason, Visual Studio doesn’t see it and I can’t connect the debugger to the process (the only project listed in the options is the Editor one with the following Port: 56580. The Android device is listed and recognized in Visual Studio (I see it in the top drop down menu - NVidia Tegra Device Toolbar Options).

I have followed the instructions listed here:

Has anyone been able to attach the debugger successfully to an Android device using visual studio and USB debugging and if so, how?

A step by step example / things to verify / things to configure would be appreciated.


I followed the instruction here:

but instead of deviceip:5555 I see my device show up as deviceip:556XX (the XX changes all the time), and when I connect to it, it shows what Unity is doing (loading module dll’s) instead of debug log of my script, please explain a bit more, thank you.

Script debugging on Android is currently working only via Wifi. USB debugging is on our list with high priority. Sorry for the bad news.