This is a quick tutorial with an applescript to output your trace callbacks into the terminal.
Since I’ve been doing a lot of flash lately, I was looking for a decent way to get all my trace callbacks displayed for debugging. Now, if you only use firefox there is the excellent flashTracer plugin, but what if you use other browsers like safari? or even when you develop air application or publish to the desktop?

That’s why I made this little applescript that will open a terminal window and show you a live feed of the flash player log file, flashLog.txt.

You can grab the files here:

FlashTrace.zip

File size: 32 Kb

Inside the zip you will find FlashTrace.app, which triggers the script. You can even drag this app to your dock for quick launching.

You dont need the actual applescript file, but I included it anyways in case you need to change something. This works with Flash Player 10 on mac OS X

Remember, in order for this to work you must do the following:

  • Install the debugger version of Flash Player 10 from here
  • In Finder, go to your home folder, and create a new file called mm.cfg (be sure that the extension is actually .cfg).
  • Open it with TextEdit or any text editor and type the following:
TraceOutPutFileName=/Users/your_username/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
ErrorReportingEnable=1
TraceOutputFileEnable=1
MaxWarnings=100   
  • In the above, be sure to change “your_username” and replace it with you actual mac username, this is the same as you home folder’s name.
  • Using finder, open your home folder and navigate to Library/Preferences/Macromedia/Flash Player/Logs/
  • If you dont see a file called flashlog.txt, just create it and name it like that.
  • Close down all your browser windows and Flash/Flex IDE and restart.

This is just the basic setup to get the flash player to actually output all the debugging info into flashlog.txt.

Now just open up flashTrace.app and you should see  terminal window pop up. Try it out by running any flash content and you’ll see the terminal window fill up with useful information, as well as all your TRACE() callbacks

Genaro