Skip to content

Instantly share code, notes, and snippets.

@wilhelmberg
Last active April 20, 2018 07:06
Show Gist options
  • Save wilhelmberg/7684834ea5de5dd54e6849005b1f9959 to your computer and use it in GitHub Desktop.
Save wilhelmberg/7684834ea5de5dd54e6849005b1f9959 to your computer and use it in GitHub Desktop.
Unity: debugging on Android with Visual Studio

https://docs.unity3d.com/Manual/AttachingMonoDevelopDebuggerToAnAndroidDevice.html

  • desktop has to be on the same WiFi as device
  • might have to switch off firewall
  • connect device via USB
  • cd %LOCALAPPDATA%\Android\Sdk\platform-tools
  • adb tcpip 5555 should output restarting in TCP mode port: 5555
    • if not dis-/reconnect device
  • find device IP
    • adb shell ifconfig wlan0
    • or Settings -> System -> About phone -> Status
  • adb connect $DEVICE_IP
  • adb devices
    • should show
    List of devices attached
    $DEVICE_IP:5555 device`
    
  • build and run
    • Development Build checked
    • Script Debugging checked
  • Visual Studio:
    • Debug -> Attach Unity Debugger
    • select device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment