Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug messages with Flex?

What's the quickest way to print "debug" messages from Flex? You know, things like "got a mouse click at ($x, $y)" or "received and event from $sender".

like image 762
David Wolever Avatar asked Aug 01 '26 04:08

David Wolever


2 Answers

trace(mouseEvent.x + ", " + mouseEvent.y);

prints it to the console if you're using Eclipse/Flex Builder.

like image 152
CookieOfFortune Avatar answered Aug 02 '26 22:08

CookieOfFortune


Using trace() is a simple way to see messages in the Flex Builder console. But you have to run in debug mode to see them. You can also get trace statements to print to a local file. For more complex logging there is a Log4J-like framework in the Flex SDK. More information on all of this is in the Flex Documentation:
http://livedocs.adobe.com/flex/3/html/help.html?content=logging_07.html

like image 26
James Ward Avatar answered Aug 02 '26 22:08

James Ward