The Ultimate Debugging And Profiling

Yesterday I came across interesting articles from jpauclair. The first one is about Almighty PreloadSWF (mm.cfg attribute to define preloader for any as3 .swf file) and the second about his new Flash Visual Profiler. Long story short, you can debug and profile any ActionScript 3 compiled .swf file on the web (or local) you decide to, for example in De MonsterDebugger (open source debugger for Adobe Flash, Flex and AIR).

You can read more about how it works on articles linked in article perex, I am gonna supply just the quick todo list to make this work. Here it is:

  • install Debug Player (if you do not have one already)
  • install De MonsterDebugger and run it
  • download MicroProfiler.swf to your local drive
  • make sure the download location (etc. d:/whatever/MicroProfiler.swf) is within local trusted scope
  • open your mm.cfg (on win XP C:\Documents and Settings\username\mm.cfg) file and add this line
    PreloadSWF=c:\whatever\MicroProfiler.swf
  • close all tabs using flash player or just restart browser

Thats it, thats all. From now on, whenever you visit any site with .swf file compiled in as3, you will see a small MicroProfiler over flash movie. If De MonsterDebugger runs it receives data, it also allows you to change variable values and call functions on the fly. Just cool.

4 comments so far

  1. 终极调试和评测 April 23, 2010 04:12

    […] The Ultimate Debugging And Profiling […]

  2. […] The Ultimate Debugging And Profiling […]

  3. jpauclair May 20, 2010 12:30

    That was only a prototype for the FlashPreloadProfiler. Look at this:
    http://jpauclair.net/flashpreloadprofiler/

  4. […] Did you know that it is not possible to debug loaded content within release (non-debug) build app? Every attempt to insert a breakpoint during the runtime will cause null pointer exception thrown by flash builder, however you can still trace() output. To be more specific, imagine you have main application deployed somewhere on the web and you want to debug a module you are just developing wrapped inside the main application. Sure you can use proxy mapping trick + custom run configuration, that would help you run your debugging version of module.swf, however while the main application is non-debug version, the flash builder debugger will just not work correctly. Luckily you have two options to make it work. First, you may also map the main application .swf file for your debug version (+ some flex rsl files) or second option, make the flash player wrap whole content into some .swf compiled in debug mode using PreloadSWF in mm.cfg. […]

Leave a comment

Please be polite and on topic. Your e-mail will never be published.