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:
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

7 Comments
*wishful thinking*
can u run commands from flash to the terminal?…
trace(’KILL PID 1′)
terminal reads: KILL PID 1
terminal kills process id 1…
can you pass byte array?
i guess the question is.. eval(’STRING’) does it work on temrinal? or something like that ????????????????
BTW
oh my god your c**k is so big….
nope, this is just a tail on the flash log file, it doesn’t do anything else but display it.
Thanks for you compliment
Genaro
Could it be that you hardcoded your username in flashTrace.app? Because every time I launch it it tells me:
jeroen@cochlea:~$ tail -f /Users/genarorg/Library/Preferences/macromedia/flash\ player/logs/flashlog.txt
tail: /Users/genarorg/Library/Preferences/macromedia/flash player/logs/flashlog.txt: No such file or directory
Maybe you should redo your script and compile the .app with ~/Library/… or $HOME/Library/… and then it works for everyone. Without needing to set the TraceOutPutFileName in mm.cfg as well, as it will default to ~/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
For the rest, great little trick there man, making it userfriendly to check flashlog.txt
Hey!, good catch, sorry about the harcoded path. I just updated the app and the script, so give it a shot =). Its on the same link above
Anyone having trouble on OS X with flash player 10.
Look in ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
Insanity!
Thanks Spencer!
Thanxx very… there was a lot of problems with the plugin from http://www.sephiroth.it/firefox/flashtracer/ … it was not running anymore on my system with new version of firefox 3.5.5…
so with your script it runs fine.
Thank you
1 Trackbacks and Pingbacks
[...] suggest you get your hands on one (or both) of these tools: FlashBug [ get it ] or FlashTrace [ this too ] (eitherway you will need the flash debugger [ need it ]). If you are doing Flash Dev on a PC and [...]
Write a Comment