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.

Actionscript:
  1. package {
  2.    
  3.     import flash.display.Sprite;
  4.     import com.soma.core.Soma;
  5.     import com.soma.core.interfaces.ISoma;
  6.     import com.soma.debugger.SomaDebugger;
  7.     import com.soma.debugger.vo.SomaDebuggerVO;
  8.     import com.soma.debugger.events.SomaDebuggerEvent;
  9.    
  10.     public class Main extends Sprite {
  11.        
  12.         function Main() {
  13.             // create soma application
  14.             var app:ISoma = new Soma(stage);
  15.             // create debugger options
  16.             var vo:SomaDebuggerVO = new SomaDebuggerVO(app, SomaDebugger.NAME_DEFAULT, [], true, false);
  17.             // create debugger
  18.             var debugger:SomaDebugger = app.createPlugin(SomaDebugger, vo) as SomaDebugger;
  19.             // use debugger
  20.             debug("Hello Debugger");
  21.             debug(this);
  22.             debug(app);
  23.         }
  24.        
  25.         private function debug(obj:Object):void {
  26.             // use app.dispatchEvent() from a class that is not in the display list
  27.             dispatchEvent(new SomaDebuggerEvent(SomaDebuggerEvent.PRINT, obj));
  28.             // events available:
  29.             // SomaDebuggerEvent.SHOW_DEBUGGER;
  30.             // SomaDebuggerEvent.CLEAR;
  31.             // SomaDebuggerEvent.PRINT;
  32.             // SomaDebuggerEvent.HIDE_DEBUGGER;
  33.             // SomaDebuggerEvent.MOVE_TO_TOP;
  34.         }
  35.        
  36.     }
  37.    
  38. }

Vote in HexoSearch
Leave a Reply