Debugging on VR headsets

Hi Community,

Hope everyone is doing great :slight_smile: It’s an interesting time for #webxr and the recent WebXR conference had some really good insights. Excited to see how things are shaping up for the same in the coming years.

I have made a few WebXR based VR apps in the past few months and used to test them using my Oculus Rift S by debugging the code on the desktop version of chrome. Everything worked well until my Rift S died.

I recently got a Quest 2 as a replacement and been testing/debugging using the link cable on the oculus browser (Using remote debugging @ chrome://inspect/#devices). Although it’s not the most elegant approach it works and I was somehow expecting the wifi-Debug to work (via ADB) which unfortunately does not and crashes a lot.

I wanted to know how does the community here do their day-to-day development to develop webxr based apps? How do we debug directly inside the VR headset so that we dont have to remove the headset every 2 minutes when a breakpoint gets hit? I have seen people complain about these issues in other forums and seems like these are some of the common problems faced by VR developers at the moment.

I have seen @Mugen87, @felixmariotto, @mrdoob, @seanwasere actively working on a lot of WebXR related projects here. Any inputs from you guys will be wonderful as well :slight_smile:

Thanks for reading through!

Regards,
Srinivas

3 Likes

I haven’t found any way of debugging without removing the headset every 2 minutes unfortunately…
I use ADB to debug on localhost ( following this article ) and my app is refreshed with webpack-dev-server, but I still have nothing to edit my code while wearing the headset.

2 Likes

Its not debugging, but If you wanted to monitor any particular variable without taking of the headset, you can use the StatsVR custom options.
See StatsVR Example 3
In the animation loop I update the custom values with the x, y, z of of the headset camera position.
And you could also, in your try catch statements, write any error messages/codes to one of the custom fields.

1 Like

Hey @felixmariotto,

Thanks for sharing your debugging techniques. Its very unfortunate that we still dont have anything to debug code directly inside the VR headset. We can only imagine a day where all we do is wear a headset and a haptic glove @work to get all those cool tactile feedback’s from a virtual mechanical keyboard to debug everything inside a VR headset :wink: We can only dream at the moment.

1 Like

Woah! This is so cool @seanwasere. I can theoretically console.log a lot of variables in VR using this so that I do need to remove my headset anymore. This helps a lot.

Already starred it on Github :slight_smile: Would be glad to contribute to this project in any way I can.

Thanks a lot for developing this.

Peace!

1 Like

I’ve had to use the Chrome inspect option as well. The best solution I’ve found is to use a cloth padding to make a gap between the headset and my nose. That way I can peek down from my headset at my laptop, type changes, then look back up at the headset without having to remove it. :grin:

It’s very inelegant, but it works.

3 Likes

@marquizzo I’ve seen somebody on Twitter who builded a metal stand behind their computer, a kind of crane attaching the headset just above eye level, so they just have to stir a little to look inside the headset. I hope it become something you can just buy in IT retailers someday :crossed_fingers:

2 Likes

Ouch! That’s an interesting way to debug :smiley: How do you manage to keep the cloth on your nose for hours on end? (Does the elastic pressure of the VR device hurt the nose?) It will be interesting if you could share a video on youtube on how you do this :wink: Hehe.

Also, don’t you have to curve your head in weird ways just to look at your laptop screen? :smiley:

@felixmariotto Could you share the link for this? If it easy to build it maybe its worth investing some time into it :slight_smile:

Could you share the link for this?

I’m afraid I couldn’t find it again, but I assume it was once a desktop lamp of this kind :

Screenshot_1

I guess you would have to make sure it can support the weight of the headset.

2 Likes

Aha, so the stand always remains behind you with the headset hanging right in front of you.
So that you could shift between real space/vr space as quickly as possible.

Thanks for sharing this, will see if its possible to fabricate it for myself :slight_smile:

Obvious for some but for those that don’t know:

A piece of tape on the Oculus Quest 1 sensor stops the darned thing from going into standby every time you remove it from your face too.

4 Likes

@felixmariotto @marquizzo you can get these kind of things for holding phones. Might be easier to adapt than a lamp - or might even be able to clamp on as is. Search for something like “adjustable holder arm”.