I created and been using on many games a DebugConsole class. It makes my work easier when testing games live and also provides an easy way to feed the QA guys with cheat codes. Anyway I thought I would share it if some of you are interested. It comes built-in with a Tracer class which is an extensive trace type of class. If you use it you can call dump in the console to get all your traces. You setup the DebugConsole with only one line from anywhere:
addChild(DebugConsole.getInstance());
You can also set it with a password for beta testing for example and also desactivate it for production.
You register all action via an helper class called ConsoleAction that way:
DebugConsole.getInstance().register(new ConsoleAction("compute", compute, "Compute Numbers.", 2, 1, ['int', 'String'], ['uint']));
only the first two parameters are required. A name by which to reference the action (will show in type hinting in console) then the method you want to run when called. You can pass also a description that will show when typing ‘help’ in console, number of required parameters, number of optional parameters, arrays of name types that will show when typing ‘help’ in console. I didn’t yet put the docs together but let me know what you think or what other features you think could be useful. Of course you open the console by typing `