Rich Rodecker’s blog on flash, flex, actionscript, javascript, and php, with a dash of randomness
View trace() statements in the terminal on os x
Today I went to go set up the FlashTracer extension for firefox. Normally I don’t use firefox, i was just going to use it for that specific plugin so I could view the trace stements while my swf was in the browser. I couldn’t actually get it to work, so I started looking around and found this post which had pretty much all the info I needed. There’s a lot of info on that page, but it turns out it’s a pretty easy task:
- Get the debug player if you don’t have it already.
- run this command in the terminal, just be sure to replace ‘username’ with your actual username :
tail -f /Users/username/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
There was some info in the other post about creating and editing a file named ‘mm.cfg’, but I already had that installed (maybe because I already had and ran the debug player?) so I didn’t need to do anything with that.
I saved the command from Terminal as a file so I can just double-click on it and run that command:

To make it a little easier to view the output, I went and grabbed a small app named Afloat, which allows you to specify that a window should always remain on top. This way i don’t have to constantly switch between the browser and the terminal window.
| Print article | This entry was posted by rich on May 27, 2007 at 1:58 pm, and is filed under flash. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 6 years ago
Nice! Thanks for the tip.
about 6 years ago
I have found that just opening the flashlog.txt file in console.app is the easiest way. -ethan
about 6 years ago
nice ethan, thats cool too, plus in the console you get the marker.
about 6 years ago
I have this now in my .bash_profile file under Mac, works great:
### From http://www.websector.de/blog/2007/02/21/are-you-looking-for-afterthought-on-os-x/
# opens "flashlog.txt" in Console
alias trace='open -a /Applications/Utilities/Console.app/ ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'
# clears "flashlog.txt"
alias cleartrace='echo > ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'
about 6 years ago
Check out these tutorials for an easier logging “flashlog.txt” on OS X, too
trace() outside the Flash IDE with tail
Are you looking for AFTERTHOUGHT on OS X?
-sectore
about 6 years ago
I don’t get it.
I’m sure I installed the debug player when I installed Flexbuilder a couple of months ago
and sure enough, when I write crap Flex code, the flash player tells me (more or less) what I did wrong on runtime errors.
AND … I’ve just re-installed it again, based on yours and the other article.
but I’ll be blowed if I can find flashlog.txt anywhere. The /Library path is correct up to (just before) /Logs and then it’s all wrong.
but /Users/username/Library/Preferences/Macromedia/Flash\ Player/ must be correct ‘cos that’s where my LocalSO’s are.
wierd.
about 6 years ago
nice, i guess from all the comments that this has been covered a bunch of times before.
barry – why don’t you do a spotlight search for flashlog.txt? if you still don’t find it, maybe start do a ‘debug movie’ (instead of ‘test movie’) once and it might show up.
about 6 years ago
I’d suggest you use Console on the mac instead
All you have to do is open the flashlog.txt file (use spotlight to find it)
Once console has it open you can use the filter to search for ERROR, WARN, INFO, DEBUG, (etc.) or a specific search term…
Tail is cool, but console is Tail on, er, Meth!
about 6 years ago
(Sorry ethan just noticed you already suggested console!)
about 5 years ago
In addition to Erik’s comment, creating a symbolic link of flashlog.txt to your Log directory will place the file in the log list drawer.
ln -s ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt ~/Library/Logs/flashlog.txt