Debugging for Oculus Quest 2 on Mac

Hi all,

I was hoping to get some guidance from the community, it's the first time I get my hands dirty with VR and I'm having quite a few issues.

I only have a MacBook that works fine for traditional Unity development but on the Oculus I can only do Build and Run, I can't seem to be able to have the Game view update if I play a scene. The problem with this approach (other than being slow, around 1 minute per cycle) is that I cannot live debug.

Is there anyone, working on Mac, that can kindly point me to how properly setup Unity 2020 for Oculus debugging?

Many thanks for any help and suggestion.

1 Like

A few hours later...

I managed to setup the environment (VSCode + Unity on Mac) for live debugging. Iterations are still slow but at least I can set breakpoints. I can use the traditional "play scene" setup at it plays locally but takes no inputs from the Oculus, so it's useless in my case. If anyone knows how to overcome this (if possible) that would be immensely appreciated!

Thank you

It's only useless if you leave it useless. Encapsulate your inputs so that they can come from either the actual VR controllers, or from your testing stand-ins (e.g. a gamepad, or keyboard/mouse), and the rest of your code doesn't know or care which it is. Then you can test in the debugger.

I've been using exactly this for my Quest development on my MacBook Pro since before the Quest came out, and it's been working fine for me.

This is indeed a good idea, thanks for sharing your process. I was initially puzzled as I couldn't figure out how to run code on the Oculus and see what was happening in the Game view on Mac. After a few days of working on it it's much more clear how to proceed. Thanks for your help.

1 Like

How do you handle switching back and forth between VR mode and pancake mode?

I don't understand the question. On the Quest, it's always in VR mode. When I run within the editor, for testing, it's always in pancake mode (but "pretending" to be VR).

I didn't realize you could use the quest on a mac to see the game preview mode in Unity on the headset itself. That's possible? I'd love to switch my development from my Win 10 machine to my mac.

You can't. That's why I said it's pancake mode (i.e., displaying an the flat screen of my laptop or its attached external monitor).

Would anyone be willing to share their code for substituting keyboard / game pad controls for oculus touch controls? One of my biggest challenges has been finding a way to simulate the 3d position of the controls for game view.

how you can test your oculus quest 2 project directly from unity on macOS using the device.

This thread needs to be answered or removed. There's a lot of discussion but no actual direction.

That's not how the forum works. Also, what you claim isn't true — the original poster found my suggestion useful, and reported success with it on Oct 27, 2020.

Some of the follow-up questions have been less clear (and one of them seems to repeat the original question, which was already answered). But that doesn't mean the thread is useless, and even if it were, we don't delete threads here (unless they are obvious spam).

1 Like

Hi! Does anyone know how to debug if you build to oculus quest 2 from a MacBook pro?
Currently, I can't use "play mode" and when building, my debug.log (obviously) doesn't show up in the console.

I'm asking because I did create all desired logic with keyboard+mouse as input, but the XR Interaction toolkit has differences which cause issues..

So far the only way I know for debugging on MacOS is to use adb. Connect your device and run from console

adb logcat -s Unity

I wasn't able to make breakpoints work with VS Code so if anybody knows how to do it, please post a detailed process. That would be much appreciated.

I just setup MacOS with Unity 2022 and Rider 2023, and remote debugging on Android (Meta Quest 2) works fine.

- build and run with script debugging enabled in Unity. This deploys a running APK file to the device.
- From unity, open a Script. This launches Rider assuming its your default editor in Unity. In Rider, Run | Attach to Unity Process and select the line with the USB/Android device
- set and hit breakpoints as needed

1 Like