Tip: Output Trace Statements Through Terminal

Recently I’ve been using the technique found here for outputting trace statements to the terminal when viewing your sites in a browser and it has worked flawlessly for me. I’ve been doing a lot of projects lately that include database integration so they have to be run in a staging environment and tracing in the Flash IDE is not an option.

The reason I’m pasting that whole article right here is for the sole purpose of archiving it on my site just in case that site goes down. Thanks goes to the original author for this.

You first need to create the txt file and directories here:
/Users/YourUserName/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt

Then you need to create the mm.cfg file in both location:
/Library/Application Support/Macromedia/mm.cfg
/Users/YourUserName/mm.cfg

Then paste the follwing code in the mm.cfg:
ErrorReportingEnable=1
TraceOutputFileEnable=1
MaxWarnings=0

Initially, I pasted the code only in the first directory and couldn’t get it to work, not sure why, so place the file in both directories to play it safe.
I am running the Flash Debug Player 10, on Mac OS X.

To see the messages as they come on Terminal, navigate to the flashlog directory and type in:
tail -f flashlog.txt

If you found this post useful, please consider leaving a comment, subscribing to the feed, or making a small donation.

5 Comments

Seeing as you using OS X, this is a great tool that I use:

http://brandonmeyer.net/blog/?p=9

@Michael: AWESOME! that’s even better as I don’t have to mess with copying stuff into the terminal window every time, just pop FlashTracerX open! Thanks a ton!

No problem. Glad I could help. Between that and the FlashTracer plugin for Firefox, I’m set.

Hey guys, if you use Flash Builder you can run debug on a live site so long as you have the source on your computer. Just hold down the debug button and click ‘Other’. Then put in the URL of your staging site. The nice thing about this approach is that it gives you full debugging tools on the live site. You can add a breakpoint, compile and upload an then the debugger will catch it on the live version. I tried using just Flash Tracer but found this to be a far superior method of debugging.

Hey, how about Geektool, to push Flash logs to the desktop? http://play.blog2t.net/geek-tool-loves-flash-trace-logs/

I’d also recommend a read at http://jpauclair.net/2010/02/10/mmcfg-treasure/ for some undocumented features.

Leave a comment

(required)

(required)