David Wolever
David Wolever

Reputation: 154494

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".

Upvotes: 3

Views: 2969

Answers (3)

CookieOfFortune
CookieOfFortune

Reputation: 13984

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

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

Upvotes: 4

James Ward
James Ward

Reputation: 29433

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

Upvotes: 3

Raul Agrait
Raul Agrait

Reputation: 6018

trace(somestring)

Upvotes: 1

Related Questions