Unable to attach visual studio debugger to magic leap

Unity Editor version: 2022.3.30f1
ML2 OS version: 1.8.0
Unity SDK version: 2.3.0
Host OS: Windows

Hello, I have followed the "Unity Debugging via Visual Studio" tutorial https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/debugging/unity-debugging-via-visual-studio/

I am able to use the Build and Run button to run my program on the Magic Leap, and even choose between the USB and Wi-Fi connection to the device in the Unity build window.

However, when pressing Attach to Unity debugger in visual studio 2022 I am only prompted to choose the connection over Wi-Fi and not USB (I enabled USB debugging in the developer settings) and when pressing the Wi-Fi connection or entering the IP manually nothing happens and not attaching to the debugger.

This problem occurs on every PC I tried to run it on.

Our guide simply provides an overview of the debugging steps. You may want to post on the Unity Discussion page for more information regarding attaching the debugger.


That said, the issue might be that there are multiple ADB instances running on the same computer. So you may need to close out of the MLHub when using visual studio.

Closing out of MLHub seems to have solved this problem, I am now able to attach the Unity debugger via USB.

Thanks for the help :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.