View trace() statements in the terminal on os x

May 27, 200711 Comments

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:

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

Filed in: flash

About the Author ()

Comments (11)

Trackback URL | Comments RSS Feed

Sites That Link to this Post

  1. Trace Flex & Flash content (minus Flex/FlashBuilder junk) | zachberry/blog | September 10, 2009
  1. Nice! Thanks for the tip.

  2. ethan says:

    I have found that just opening the flashlog.txt file in is the easiest way. -ethan

  3. rich says:

    nice ethan, thats cool too, plus in the console you get the marker.

  4. Erki Esken says:

    I have this now in my .bash_profile file under Mac, works great:

    ### From
    # opens "flashlog.txt" in Console
    alias trace='open -a /Applications/Utilities/ ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'
    # clears "flashlog.txt"
    alias cleartrace='echo > ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'

  5. sectore says:

    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?


  6. barry.b says:

    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.


  7. rich says:

    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.

  8. JasonM says:

    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!

  9. JasonM says:

    (Sorry ethan just noticed you already suggested console!)

  10. PeterC says:

    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

Leave a Reply

Back to Top