WebKit-style debugger for Mobile Web

Debugging HTML5 code running inside a WebView on a mobile device is a pain. But now, with Trigger.io Catalyst, you can get a web-kit style debugger which works for mobile web or hybrid apps.

  • Elements tab to navigate and alter the DOM, including styling
  • JavaScript console: query objects and test code inside the WebView
  • Observe network usage and execution order
  • Trigger.io Forge specific: log debug messages to the console and track Forge API calls when building hybrid apps

Trigger.io Catalyst is a hosted version of Weinre.

Documentation

Get started

In order to use Catalyst you need to embed a unique script tag into the page you wish to remotely debug. Every time you load this page a unique id is generated for you, so to get started simply paste the following line into the <head> section of your page:

<script src="???"></script>

Once you have deployed your updated webpage you can remotely view the DOM and execute Javascript using the following link: ???

Advanced usage

When debugging Forge applications it can be useful to force the app to wait for Catalyst to be connected before executing any Javascript. This ensures any errors which may happen almost immediately are show in the Catalyst console.

In order to do this the following line needs to be added to your Javascript:

forge.enableDebug();

This should be added to the top of your Javascript code: any API calls made before this may occur before Catalyst is connected.

While debug mode is enabled it is important to remember to include the Catalyst script tag, otherwise Forge will wait for the Catalyst connection indefinitely and no Javascript will be executed.

Troubleshooting

If things aren't working here is a list of common pitfalls when using Catalyst:

  • Catalyst requires both the device being debugged and the machine being used to debug it have an internet connection and can access this site.
  • Catalyst has currently only been heavily tested with Android 2.2, and may not work as expected on other platforms
  • Catalyst requires a webkit based browser is used, this means only Chrome and Safari are well supported
  • Sometimes the Catalyst server needs to be restarted to apply updates, if this happens you will be told to reload the Catalyst page to reconnect.

Support

Find answers and ask questions on our StackOverflow tag

Email us anytime at support@trigger.io if you run into problems or have feedback