Kernel Debugger

debugger
I’ve been using this for a long time now, it’s a debugger that runs in another SWF and is passed trace statements via my Debug class, with different levels or detail, info, warning, event, classinfo, error etc. It also has a runtime monitor graph at the bottom, the yellow line showing the current framerate, and the blue line showing the time it takes to execute all threads currently running in the Kernel class. The Kernel is basically a single onEnterFrame on a MovieClip in the _root, which runs through an array of threads, I simply have a getTimer() at either side of the thread execution and time it, this is a great way to view code-weight, especially when developing games or persistent enviornments such as physical engines.

I will make a public release of the Kernel, Thread and ThreadGroup classes soon, which will also include the debugger.

32 Comments so far

  1. Zokdok / January 26th, 2007 10:48 am

    Looks neat!
    I’m looking forward to test it.

    Is it difficult to attach it to a project?
    And more importantly, when building a project for deployment, is it easy to not include the code for this?

  2. simon / January 26th, 2007 2:46 pm

    Nice. Love the look of the graph readout. If you click on spikes in the graph, can the debugger scroll to the point where the spikes happened? Something like that would be very very cool. Maybe then the graph should be vertical (roatted 90 degrees clockwise), so it relates to the trace readout; could work like a kinda scroll bar?

    I’ve been using FlashInspector on top of as2lib, which looks ugly (especially compared to yours), but works really well becuase it catches info from wherever your swf is running - does yours do that as well?

    Could yours integrate with as2lib as well?

    Man, never thought I’d get excited about a debugger.

  3. pixelbreaker / January 26th, 2007 3:38 pm

    Yo, yeah, it can capture output from any swf in any player, LocalConnection class can communicate between any players ( it’s a bit more tricky on Intel Macs, the player instances must both be intel or both PPC versions )

    The graph doesn’t really relate exactly to the output in the trace panel. The graph builds at one pixel per second, that’s the most accurate way to get an FPS.

    Another thing I want to add is watchers. Where instead of tracing out the same var again and again in a Thread or onEnterFrame, and having 10000 of them in the trace window, you can register a variable to be watched and it gets it’s own textfield to constantly update to in the debugger. I really need something like that at the moment with this physics stuff I’m working on…

  4. simon / January 27th, 2007 11:23 am

    Yeah that’s the kind of thing I think you can do though binding - dataProvider in Flash ? - except that wouldn’t allow a nice way of watching particular properties of a particular instance.

    Would be really nice to have number properties traced on your graph as well, and be able to dynamically add them at runtime. Check out the forthcoming Apple Xray tool.

    I’m not sure if I explained very well what I mean with the trace window / graph window. I will try and draw a picture… uh… later.

  5. pixelbreaker / January 27th, 2007 11:10 pm

    Xray looks wicked, something like that for flash would be great. As for binding with stuff like the dataProvider class, I’m not sure, I try and avoid anything written by macromedia from MX days cos it’s shit and heavy, generally better off building my own ways off doing things.

    Flash CS3 components/classes should be better, cos they’re written by real people!

  6. Rory MacDonald / January 28th, 2007 3:20 pm

    Ive been playing a bit with luminicbox, which is an OSFlash project debugger thang. It hasnt got framerate capturing, but it does allow you to track variable’s at runtime and recurse through _level0 and all sorts of crazy shizzle like that. Similar to Si’s tool, the interface need’s some work, but worth having a look nevertheless.

    http://osflash.org/luminicbox.log

  7. pixelbreaker / January 28th, 2007 4:35 pm

    Hi roz,

    Yeah, I know the Luminic Box thing. it’s good, for sure, but it’s a bit heavy and uses a lot of flash’s resources on it’s own, which is kind of annoying.

  8. simon / January 29th, 2007 8:10 am

    Agree completely about the MX packages, you put it so, uh, eloquently.

    Rozza, the LuminicBox is the thing I refer to as FlashInspector. I like it because it’s the only way I have of getting debugging output when I’m not in the IDE but it does run slowly; you can easily disable it when something goes ‘live’ though.

    I also have it running on top of the as2lib Logger classes, that provides a really nice but text-only debugging environment. If you all your classes extend BasicClass (as opposed to Object) from as2lib, then you get even better debugging info as it can work out the correct package names of all your instances at runtime.

  9. pixelbreaker / January 29th, 2007 11:12 am

    Bring on as3 flash.utils.getQualifiedClassName();

  10. pintje / February 5th, 2007 1:30 am

    Reflections would be useful…

  11. Zokdok / March 1st, 2007 5:27 pm

    Any news on the kernel debugger?
    I sure would like to test it for once :)

  12. pixelbreaker / March 1st, 2007 5:53 pm

    Hey Zok, I haven’t had any time to look at this for ages, been so busy. I’m going to wait until I start porting all my current code over to AS3, so it’ll be a while, but I’ll let you know once it’s available.

  13. sex hikayeleri / August 24th, 2007 1:31 pm

    thanks

  14. msn / October 4th, 2007 5:57 pm

    The best is not always the most popular. My favorite scientific blogs….

  15. […] Hard Werkend Nederland - Boomknuffelende ecofascisten: 1 - 0 pixelbreaker : Kernel Debugger Adobe Labs: Adobe Flash Media Encoder Now Shipping Stylegala - Web Design Publication HOWTO: Be […]

  16. magla / November 25th, 2007 1:27 pm

    thank you

  17. hikaye / November 25th, 2007 2:21 pm

    Thanks..

  18. Microsoft forever

  19. olabilir / November 26th, 2007 9:33 am

    Flash CS3 components/classes should be better, cos they’re written by real people!

  20. sekati / December 13th, 2007 10:10 pm

    Would love to see this - even if it is old and sloppy - would love to incorporate some of its features into my AS2/AS3 frameworks current Logger/Console (http://sasapi.googlecode.com/).

    I looked for an email addy to contact you directly on this but it seems you neglected to share an email addy on you About page ;)

  21. TribunTV / December 24th, 2007 3:56 pm

    Thank’ S

  22. tsc1963 / December 24th, 2007 3:58 pm

    Thank’ s You

  23. wmwebtr ödüllü seo yarışması / December 25th, 2007 9:35 pm

    thanks you nice.

  24. araba kiralama / January 7th, 2008 9:12 pm

    Thanks, this technic is really perfect…

  25. Telefon / January 19th, 2008 4:53 am

    thanx for nothing

  26. Alex / February 25th, 2008 12:23 pm

    awesome!
    thanx in advice

  27. film indir / March 2nd, 2008 10:55 am

    awesome
    thx

  28. marka / March 23rd, 2008 6:58 pm

    Looks very interesting.
    Thanks for sharing.

  29. toplist / March 25th, 2008 8:14 pm
  30. forum / March 27th, 2008 6:46 pm

    I Think forever Microsoft

  31. film izle filmizle / March 28th, 2008 2:18 pm
  32. İslam Dini / April 7th, 2008 6:35 pm

    THANKS