I’ve updated the debugger used in SomaCore. You can know click on everything to parse the objects and I’ve added a FPS + Memory meter. I’ll continue to improve the debugger with my needs, next step might be a Garbage Collection monitor.

Click here to see the debugger in action.

Tips: if you close the debugger, type “debug” to get it back.

Here is a little bit of code in case you want to want to use the debugger without using the SomaCore Framework.

package {
	
	import flash.display.Sprite;
	import com.soma.core.Soma;
	import com.soma.core.interfaces.ISoma;
	import com.soma.debugger.SomaDebugger;
	import com.soma.debugger.vo.SomaDebuggerVO;
	import com.soma.debugger.events.SomaDebuggerEvent;
	
	public class Main extends Sprite {
		
		function Main() {
			// create soma application
			var app:ISoma = new Soma(stage);
			// create debugger options
			var vo:SomaDebuggerVO = new SomaDebuggerVO(app, SomaDebugger.NAME_DEFAULT, [], true, false);
			// create debugger
			var debugger:SomaDebugger = app.createPlugin(SomaDebugger, vo) as SomaDebugger;
			// use debugger
			debug("Hello Debugger");
			debug(this);
			debug(app);
		}
		
		private function debug(obj:Object):void {
			// use app.dispatchEvent() from a class that is not in the display list
			dispatchEvent(new SomaDebuggerEvent(SomaDebuggerEvent.PRINT, obj));
			// events available:
			// SomaDebuggerEvent.SHOW_DEBUGGER;
			// SomaDebuggerEvent.CLEAR;
			// SomaDebuggerEvent.PRINT;
			// SomaDebuggerEvent.HIDE_DEBUGGER;
			// SomaDebuggerEvent.MOVE_TO_TOP;
		}
		
	}
	
}

Share and Enjoy!