Remote Debugging

Matt Karl edited this page Oct 9, 2015 · 5 revisions

In general, Safari on iOS and Google Chrome on Android support debugging methods over USB. You can find lots of information about this online. But there are some cases where it's helpful to have another options for debugging, so we added Remote Trace to SpringRoll Studio.

Here is the basic requirements:

  • Make sure "components/springroll/dist/modules/debug.js" and "components/springroll/dist/modules/debug.css" are included in springroll.json in the librariesDebug section.
  • Build your application and libraries in debug mode (e.g. grunt debug).
  • Enable the debugRemote option on your application, see docs.
// debugRemote can be IP or host name where to send logs
// should be the computer on the network which is running
// SpringRoll Studio with the Remote window opened. 
var app = new Application({
	debugRemote: '' 

In order to send messages to Remote Trace (under "View" menu) in SpringRoll Studio, use the Debug class in SpringRoll. Debug works exactly like console in JavaScript. Full API is here.

var Debug = include('springroll.Debug');
Debug.log("General message");
Debug.warn("Warning message");"Colored Green!"); // support for colors
Debug.log({ value: 100 }); // support for objects