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:

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.

11 thoughts on “View trace() statements in the terminal on os x”

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

  2. 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'

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


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

  5. 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!

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

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>