Reputation: 4039
I'm using Flashbuilder 4.7. I'm trying to figure out how to have some sort of loggin function, without install the debug version of flash (it always make flash run like crap on my system). I found this article about using the loggin functionality in flex. but when I add the code
import mx.logging.; import mx.logging.targets.;
flex does not recognize the classes
Upvotes: 0
Views: 1352
Reputation: 4039
I ended up using Monster Debugger I found that it was easy to integrate into the project, and has a nice interface.
Upvotes: 0
Reputation: 18193
Your import statements should either include a wildcard (*) at the end, or the exact class name that you wish to import.
So instead of this:
import mx.logging.;
import mx.logging.targets.;
You should do this:
import mx.logging.*;
import mx.logging.targets.*;
Or:
import mx.logging.Log;
import mx.logging.targets.TraceTarget;
Lastly, without the debug Flash Player these classes won't be that useful. For example, if you're using TraceTarget
(the default) it will log the output to your console via the trace()
method. The regular Flash Player won't connect to the console, so you won't see any output.
The debuggable version of Flash Player is slower than the regular Flash Player, but it's never been that slow that I could not or did not want to use it. I won't code in Flash without it. With the regular Flash Player exceptions that occur in your code will occur silently and you potentially can miss bugs in your code. With the debug version, a dialog pops up with a stack trace when the exception occurs, so you notice right away :)
There is one thing that will make the debug version of Flash Player really slow, and that's if you enable logging to disk. Don't do that unless you absolutely need it (it's practically unusable at times).
Upvotes: 1