Search code examples
iosmobileaugmented-realityargon

How to do remote debugging with argon.js and Argon4?


Similar to remote debugging with iOS(using Safari) or Android(using Chrome), I'd like to do the same thing with Argon.


Solution

  • I assume you mean debugging argon.js apps using Argon4, the current version of the iOS app (at http://argonjs.io).

    Like other apps that use Apple's built-in WkWebView, you can't use a remote debugger, since Apple won’t allow the remote debugger to work for any app except mobile safari. Which makes sense, since there are lots of technologies for building mobile apps using web tech, and people don’t want folks poking around inside their apps.

    When developing a website using argon.js, if you are doing geospatial AR (essentially, anything that doesn't use Vuforia), you can just run the app in mobile Safari and use the remote debugger as you might hope.

    My general approach is to developing and debugging with argon.js on Argon4 is:

    • first pass through, I debug on desktop in Safari or Firefox or Chrome (so I get the desktop debugger of my choice). This helps find many of those annoying little errors and typos. Take a look at some of the samples, such as the Vuforia samples, which re-orient the content to ensure it's visible even when there is no Vuforia running. I did this explicitly to enable me to see the content and debug.
    • second pass in Argon4 (since I built the app myself during development, I can do remote debugging), but you could use mobile Safari something that's closer to Argon, and still get remote debugging.
    • finally, I test in Argon4 itself. You can use the console to print things to, look for errors and so forth. Not idea, I know.

    FYI you may find http://vorlonjs.com/ is useful for remote debugging an app while running in Argon.