Documentation

Debugging

The following section describes a default development workflow for writing AR content using the ARchitect JavaScript API. It demonstrates the code test and debug cycle and provides useful tips for each step.

  1. Write your HTML, JavaScript and CSS using the text editor of your choice
  2. Test in your desktop browser
  3. Debug in your desktop browser using e.g. WebInspector
  4. Test on a physical device
  5. Debug on a physical device
  6. Rinse and repeat

You can use any editor for writing the ARchitect World. We particularly like Sublime, which has a great selection of plugins for web developers.

The next step is to test it out in a desktop browser. To have the ARchitect JavaScript API available in the desktop browser you'll need to include the ARchitect Desktop Engine (ADE). See the chapter ARchitect Desktop Engine for instructions on how to use it. While this is limited in visualizing the experience, it greatly helps in finding errors in the JavaScript code and reduces the time it takes to see effects of changes you have made to the HTML and CSS parts. Desktop browsers come with great debugging tools (e.g. Chrome's DevTools ) that allow you to easily debug your JavaScript code and that you should make full use of when debugging ARchitect Worlds.

Once you have verified the JavaScript is working properly you should test it on the device of your choice. Either start your application that loads the ARchitect World or run it inside the Wikitude World Browser app.