Flash Builder 4 – Profiling won’t start for my Air App!

So I ran into an interesting problem today that I couldn’t find any information on out there for. I still don’t have a concrete idea of what is going on, but I do have a workaround.

This afternoon I was trying to launch the Profiler from within Flash Builder 4 to start looking at memory management optimization of the desktop application we are currently developing. To my surprise, when clicking “Profile Application,” the application would launch in adl but FB4 would not switch to the Flash Profile view.

I spent a couple of hours rebuilding the project files from scratch, but still no dice. Through all my testing I could build any number of new empty air projects and they would all build and profile properly.

But not my code.

So I created a new default app, launched with profiler…. And it worked! (But no code, of course).

It turns out that, for some reason, the initialization code for my application seems to be bogging down ADL so much that it is unable to connect with the profiler on launch.

My solution to the problem was to add a 1 second timer that would slow down the initialization of my application until the Profiler was able to connect–and it worked.

Strange workaround to a strange problem. If anybody else has any ideas, let me know.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>