I'm trying to debug Unity game from PC with Windows 10 to Android phone:
- In Unity from
File > Build SettingsI'veSwitch Platformto Android - In Android device I've downloaded and installed Unity Remote 5 application.
- In phone
Settings/About phonewith 7 taps onBuild numberI getDeveloper Optionsand turned on USB debugging and tap on Revoke USB debugging authorization - In Select USB Configuration I've checked PTP (Picture Transfer Protocol)
I've checked 2 different USB cables with 3 different phones and each device is successfully detected and recognized by PC OS, Unity Remote says "Connect this device with a USB Cable to your computer. Press PLAY in the Unity Editor to test", but Unity Editor by some reason does not shows any of my devices in Edit > Project Settings > Editor device:
edit:
I've downloaded both Android Studio and separately sdk-tools-windows-4333796.exe from Command line tools only.
First I've installed from Java SE Development Kit 8u241 jdk-8u241-windows-x64.exe for Windows x64
In Windows 10 OS Environment Variables/System Variables/Path, I've added C:\Program Files\Java\jdk1.8.0_241\bin and C:\Program Files\Java\jre1.8.0_241\bin
In User Variables I've added Variable name: JAVA_HOME and Variable value: C:\Program Files\Java\jdk1.8.0_241\bin
So, first I did not used sdk-tools-windows-4333796.exe and have installed Android Studio, here is what Edit > Preferences > External Tools shows:
Then, I've removed Android Studio and tried to use only sdk-tools-windows-4333796.exe, I've extracted tools folder to previously created folders path C:\Android\android-sdk, then from C:\Android\android-sdk\tools\bin load sdkmanager.bat with "platform;android-25" or "platform;android-26" argument, but error says:
Warning: File C:\Users\User.android\repositories.cfg could not be loaded. Warning: Failed to find package platform;android-25 [===
] 10% Computing updates... C:\Android\android-sdk\tools\bin>
And finally I've tried install with Unity Hub:
but it same result, device does not appears in Editor, and External Tools shows checked:
and if unchecked:
I'm not quite sure, what I've missed or what I'm doing incorrectly
Any guide, advice or example would be helpful





To use Visual Studio 2019 to debug a Unity app running on an Android device connected to USB:
Place breakpoints in the code for single stepping and watching and inspecting variables as needed.