Skip to content
bigtimebuddy edited this page Oct 8, 2014 · 5 revisions

Remote debugging allows the developer to send console logs over a network on internet connection. While modern versions of browsers now support remote debugging over a USB cable, there are some scenarios where either the desktop or device don't support debugging this way, such as early versions of the Android stock browser. There are two convenient methods for remote debugging without USB.

RemoteTrace Method (recommended)

To use remote debugging, you'll need to install and launch RemoteTrace on the computer that will receive your logs. Please download the appropriate binary for your platform.

Both the device you're debugging on and the computer with RemoteTrace installed need to be on the same local area network. RemoteTrace is the recommended method for remote debugging since logs are sent over the local network and this is much faster than JSConsole. The debugging device must be able to use WebSockets, if it doesn't use the JSConsole Method.

Make sure that debug and debugRemote are set as Application options when your application is created. For instance:

var app = new Application({
	debug: true,
	debugRemote: '192.168.1.2' // either IP address or host name (e.g. "localhost")
});

Now whenever logs are sent with the Debug class, they will be outputted to the RemoteTrace program.

Debug.log("General trace");
Debug.debug("Debugging trace");
Debug.info("Informational trace");
Debug.warn("Warning trace");
Debug.error("Error or fatal trace");

RemoteTrace Preview

JSConsole Method

JSConsole is a handy too if your browser doesn't support WebSockets. The core Debug class provides supports for outputting logs to JSConsole. Use this guide to setup. Just include the <script> that JSConsole gives you and start debugging.