VS Debugger hangs on attach

Unity Editor version: 2022.2.0a14.2006
ML2 OS version: Build: B3E.220619.07-R.124 SDK Version 29
MLSDK version: 0.53.1

"MagicLeap_Examples" APK was created with Development build and Script Debugging option enabled. APK is deployed and the app is running. VS debugger sees the AndroidPlayer over the USB, but hangs on attach attempt. Tried VS 2019 Pro (16.11.11) and the latest VS 2022 Pro (17.2.6) with the same effect. Please advice if there is any known issues or workarounds?

1 Like

Hi Eugene

Are you able to attach visual studio to your Unity Editor? In visual studio please go to

  • ToolsOptionsTools for Unity
  • Debugging (section)
  • Then Set “Preferred Android Sdk Root” appropriately for your project.
    • You’ll need to locate the the AndroidPlayer\SDK folder that you are pointing to inside of unity.

If this does not work, make sure that the Visual Studio plugin is up to date inside of the Unity Package manager. If this also does not work, I will file a bug with Unity, in the past developers have been able to get around a similar issue when debugging their Android applications by debugging over Wifi instead of USB.

1 Like