Geoff Garbers

Husband. Programmer. Tinkerer.

Installing the debug version of Adobe Flash in Linux

Jan 12, 2012

So, we all know JavaScript is relatively easy to debug, right (run-time debugging, that is)? Simply install Firebug, and you’re ready to go. What about listening to all your traces in Flash, and seeing what’s happening there? That becomes a little bit more tricky.

However, not to worry. I have a really simple and easy-to-follow solution (found in this forum post, for reference) for Linux Mint and (apparently) Ubuntu Linux 9.04 updwards.

Installing the debugger

Firstly, you’ll need to make sure you’re using the non-free version of Flash. You can do this by running sudo apt-get install flashplugin-nonfree. This should download and install the non-free version of Adobe flash.

Then, download the debugger version of Adobe flash from the Adobe download section. I downloaded the Linux Flash Player 11.1 Plugin content debugger, and that worked fine for me.

Next, back up the existing Flash player plugin, and replace it with the downloaded .so file found in the download provided by Adobe. You can do this by executing the following commands as root:

mv /usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/flashplugin-installer/libflashplayer.backup.so
cp /path/to/extracted/download/libflashplayer.so /usr/lib/flashplugin-installer/libflashplayer.so

Finally, you will need to restart your browser in order for the change to take effect. Once done, visit http://sandbox.garbers.co.za/flash-debugger-check to check whether or not you have the debugger installed correctly. If it states that you do, then congrats, you’ve finished this part successfully.

Using the debugger

So, now that you have this amazing debugger installed, what can you do with it?

Log file tailing

You can run a following tail command on $HOME/.macromedia/Flash_Player/Logs/flashlog.txt. All the trace output from flash files are placed here. In case you’re not sure how to do this, you can run the following command:

tail -f $HOME/.macromedia/Flash_Player/Logs/flashlog.txt

Flashbug

You can integrate Firebug with another Firefox addon called Flashbug. Flashbug makes use of the Adobe Flash debugger and places trace output into the console.

Vizzy flash tracer

Vizzy is a stand-alone Java application that allows for quick and easy debugging of the Adobe Flash debugger output. Quite useful for filtering for specified output too. You can download it from its Google Code page.

Exception notifications

I mainly needed to install this plugin in order to hopefully find the cause of an exception that was being through by Adobe Flash player. I was given no extra information via JavaScript (even using a try/catch block) as to the cause of this.

Thankfully, something I found (quite by accident), is that the Adobe Flash debugger will, upon an uncaught exception being thrown, display a popup notification with a stack trace for the exception. This helps in debugging unknown exceptions immensely!