Monday, November 16, 2009

Making Flex Profiler Work

Trying to improve my Actionscript debugging skills I decided to finally investigate what Adobe Flex 3 Professional Profiler is all about. David Gassner's Flex 3 Bible was not much help unfortunately. It just references it and limits itself to telling you what buttons to click in the UI to start it but doesn't give a detailed explanation on it.

Obviously, it didn't work for me. Opened up a project in Flex, clicked Run/Profile and nothing happened. At first I thought it was because it was an pure Actionscript Project but then after researching a bit I found out that I was not alone, it is a fairly common problem with FB3 Pro.

This post from arielsommeria.com helped me the most but I still couldn't make it work. Trying out different things, I finally made it work when I entered the ProfilerAgent.swf path like so in the mm.cfg:

[Windows Vista]
PreloadSwf=file:///C:/Users/[profile name]/[Flex Workspace]/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&port=9999

This is, the file system path not the paths that appeared on every post online.

I hope it helps somebody and also check out the following video explanation of Flex Profiler from Adobe TV