Most probably you've already heard about firebug, if you haven't, I really recommend you go give it a spin right now.
It also gives you a fantastic console that lets you expose information about what's flowing through your scripts. Adding a global variable named "console" it exposes many methods that allow you to write to the Firebug console.
try it out, go:
and you will see the output in the image above.
To save you some time and make things cleaner, here you will find an AS3 Class that exposes the console object to any of your Actionscript/flex applications.
All methods are static so you don't need to instantiate the class.
From actionscript, all you need to do now is:
I guess the only drawback for this is that this will bong out if you are trying to dump an object with circular references, or your object is too big. - I can't find out what's the size limit right now, but I've seen it throwing an exception when the objects I passed where too complex.
In case you need something more robust to debug your code, then I really recommend you try out FlexBuilder's debugger.