iosremote-debuggingmozillawebxr

mozilla webxr-viewer remote debug on non-jailbroken ios


webxr viewer is an webxr-enabled browser for ios.

works great so far, but now i am at a point where i need to debug my scenes.

i can connect the phone to a mac and debug safari, is there a way to get that same functionality for the webxr-viewer app?

the viewer itself has a "webxr debug" button, so i guess the developers thought about this possibility, but no documentation ever mentions how to actually connect to a debug ui/app on the mac.

  1. am i right in assuming i would have to download the webxr branch from the firefox-ios github and build it myself?

  2. is there a way to debug arkit directly?


Solution

  • theoretically, one could do as i write above, clone the webxr branch of firefox-ios, then build it in xcode and install it via usb on the phone. i started doing so, until i clicked the build button: this needs a developer account with apple to work.

    since i do not know if building firefox-ios would allow me to debug the arkit scene, i decided not to bother.

    i instead opted to solving this using a classical ie6-style debugDiv:

    const debugDiv = document.createElement('div')
    document.body.appendChild(debugDiv)
    try {
      // ... code that errors
    } catch(e) {
      debugDiv.innerHTML += e.toString()
    }
    

    this needs to be done inside the arkit executed code, since arkit adds a weird sandbox, also requires the "dom-overlay" feature in webxr to be requested and available, but if those two prerequisites are met, it works like it's 2001...