VSCode debugging with Unity extension and Quest 3 never works with the Mixed Reality template

I created a brand new Mixed Reality project based off Mixed Reality Template Quick Start Guide | Mixed Reality | 1.0.1 (unity3d.com)

I made no changes to it. Now I want to attached the debugger. I enabled ‘Development Build’ and ‘Script Debugging’ in Android Build Settings, and in ‘Player Settings’ → ‘Player’ I removed ‘Vulkan’ from ‘Graphics APIs’ since it just crashes every time (see Unity Issue Tracker - [Quest] - Vulkan Development Build crashes on load (unity3d.com)).

VSCode then gives the opportunity to attach to ‘Unity Editor ’ when selecting ‘Attach Unity Debugger’, and it does attach. However no breakpoints in my own .cs files are ever hit.

Moreover, if I select ‘Wait For Managed Debugger’ in Build Settings, it will just wait forever. While running if I again select ‘Attach Unity Debugger’ to display the list, it never changes.

I also enabled internet access by removing the force removal in OpenXR meta quest support, and set internet access to require in player.

Can anyone tell me what is going on and how I can get the debugger to attach with the quest3 in VSCode? Thanks.

I’d first check if the Quest has developer mode enabled. Refer to the Quest developer manual.

Try Visual Studio debugger to see if this works. If it does, you now have a working debugger that also happens to have a suitable IDE that gets exercised a lot by developers, so issues tend to be well known. :wink:

VS Code is not officially supported by Unity anymore. It’s a bit of a fringe development environment prone to issues that are surprisingly often not been reported before by other developers. Either because relatively few developers are using VS Code, and/or due to the sheer number and versions of extensions that may interfere with each other in unique ways.

If you keep having issues particularly with VS Code, make sure you use Microsoft’s latest 1.0.0 Unity extension, and uninstall any extensions that are not required, and go through the set up steps again in case you may only have to flip the right switch somewhere. Ensure debugging works with a desktop build.