1 Reply Latest reply on May 30, 2011 5:21 AM by blazejewicz

    Debugging an mxml/swf program



      I am developing a simble but with involved Flex program and I would like to know what it happens before the final result is shown on the page. Is there some way to write some logs or show alerts to check at least whether the control passes in certain parts?



      Fabrizio Bartolomucci

        • 1. Re: Debugging an mxml/swf program
          blazejewicz Level 4

          Hi Fabrizio,


          it depends on what exactly you're trying to debug,

          If you are looking to get into some internals of e.g. component you could for example overwrite its "dispatchEvent" method to add your own trace there and then run in debug mode, e.g.:

          override public function dispatchEvent(event:Event):Boolean



               return super.dispatchEvent(event);


          That way you could see what events are dispatched in which order.

          Do not use alerts, use "trace" if possible and run your content in debug mode. It is more unobtrusive (sometimes "alerts" affects your code execution flow in unexpected ways).

          See doc on how to use Flash Builder to debug:

          http://help.adobe.com/en_US/flashbuilder/using/WS6f97d7caa66ef6eb1e63e3d11b6c4d0d21-7f07.h tml

          kind regards,