Announcing AMF Explorer
Back in late 2008 the nsITraceableChannel interface was added to the Mozilla browser allowing extension developers to intercept incoming HTTP responses. At that time I pondered the possibility of adding AMF support to Firebug, however life got in the way and I never really had time to fully explore what it would take to do this. That is until now. Today I'm happy to announce that I'm finally releasing AMF Explorer.
AMF Explorer works like the JSON Explorer and XML Explorer features of Firebug, allowing developers to view deserialized AMF messages in Firebug's Net panel. While it is currently listed as experimental while waiting to undergo the public review process, you can download AMF Explorer from the Mozilla Add-ons site today. AMF Explorer is a Firebug extension and such it requires Firebug 1.5 to work. Below is a screen shot of AMF Explorer in action.

If you download this add-on and like it, please consider giving it a good rating/review on the Mozilla Add-ons site as that will help with the public review process. If you really like the extension, and I hope you do, you can also make a donation via the add-on site. I'm suggesting $1.99 but you can donate as much or little as you would like. Also note that this is an early release of the extension so if you have any issues please be sure to report them on the RIAForge project site, where you can also find all the latest source code in the SVN repository.
Building AMF Explorer
So what did it take to build this extension? Well I noticed there were two projects that had attempted to do this in the past but had stalled for one reason or another: FireAMF and Flashbug. Of the two projects Flashbug by Gabriel Mariani appeared to be the most promising. Gabriel claimed to have AMF request deserialization working but was having issues getting AMF responses from Firefox. I tried Flashbug but couldn't get it to deserialize my flex remoting requests. I took a look at Flashbug's source thinking maybe I would fix the issue there, but Flashbug is a decent sized extension so I decided to start out with a brand new add-on that only did AMF deserialization. I based the new extension on the existing JSON Explorer and XML Explorer features of Firebug. With this new code base I was able to get an early version of the add-on working last week using Gabriel's AMF deserialization libraries, however in testing I noticed that those libraries had some issues deserializing certain objects. After talking with Gabriel I found out his libraries were based primarily on AMFPHP so I decided to build a new JavaScript AMF deserializer based on BlazeDS. Over this past weekend I did a line by line port of the relevant BlazeDS classes and am now using this library in AMF Explorer. I've yet to notice any major issue with this library, but I'm sure there are some things I missed. Java and JavaScript are just close enough that it makes it difficult to spot syntax errors (i.e. int x = 1; (Java) vs. var x = 1; (JavaScript)). Again if you notice anything please report it on the RIAForge site.
Future Plans
Right now the AMF data is only displayed in the Net panel using the default Firebug object rendering. While this works, I plan to update the formatting in the Net panel a bit, as well as look at adding a top level Firebug tab to show the latest AMF reqeust/response. I have no idea when I'll get the time to implement all of this, but it is on the list. Finally, another know limitation of the extension is that it does not deserialize small messages. I plan to try to fix this in the very near future, but again no promises.
As always, any feedback you have on AMF Explorer is welcomed. Thanks and enjoy!



