Changes

Jump to: navigation, search

How to debug a XULRunner application

35 bytes added, 16:58, 13 December 2006
Console
== Introduction ==The easiest way to debug XULRunner application is using the console. This document will discuss various console consoles and preferences user can set to make their life easier debugging XULRunner applications.
== Prefs ==
== Console ==
To use the console on windows when Windows while running xulrunner a XULRunner application simply use the following console argument. An example of this would be the following:
xulrunner application.ini -console
There are two ways of outputting messages into the JavaScript console.
 
One of the ways is using Components.utils.reportError. This is a JavaScript Error object used for returning errors onto the JavaScript console. Developers tend to use this command in the exception handler block of the code. There will be a red stop icon next to the error in the JavaScript console using this method. To print debugging code onto the console, type the following:
Components.utils.reportError("''error message''");
 
Another alternative in displaying error messages in the JavaScript console is building a custom error messaging function. This guide will call their custom function jsdump. In the function it will contain the following:
1
edit

Navigation menu