Archive for June, 2006

What to do if Flex Builder says, “Installed Flash Player Is Not a Debugger”

If you have installed Flex Builder, and when try to debug you get an error message that says “Installed Flash Player is not a debugger,” or if the Flex SDK’s fdb command-line debugger says, “Failed to connect; session timed out,” then see this TechNote to get instructions on how to fix the problem.

A packaging problem with the initial release of Flex Builder and the SDK has caused a number of people to run into this. Luckily, fixing it is easy.

Flex 2 has launched! What’s new in the debugger since Beta 3

An exciting, exciting day!

As for the Flex Builder debugger: Other than bug fixes, there is one tiny new feature in the debugger since Beta 3. Sometimes, when looking at source code, it isn't obvious which lines you can actually set a breakpoint on. For example:

function f(z:int):void // can you set a breakpoint on this line?
{                      // this one?
  var i:int;           // this one?
 
  trace(               // this one?
      z                // this one?
  );                   // this one?
}                      // this one? 

The answers depend on how the compiler does its work, and figuring out those answers requires tedious trial and error. It's not something people should have to think about.

So, to make life easier for the user, we made a small change: If you set a breakpoint but it turns out that there is no actual code on the line you specified, then we scan down a few lines (ten, actually) to see if we can find a line that has code on it. If we do find such a line, then we move your breakpoint there.

If you set a breakpoint while in the middle of a debugging session, the breakpoint is adjusted immediately. If you set a breakpoint before you have started your debugging session, then the breakpoints are initially left where you put them, but are then adjusted when you actually begin the debugging session (click "Debug").

Sometimes my favorite features are the ones that transparently "just work," solving a problem so quietly that the user doesn't even realize the feature it there. It's a beautiful thing, because it makes the user's life a little easier, but without giving him something extra to have to think about. There is no "We've moved your breakpoints" message; that would just distract and worry the user.

Setting the width and height of a pure-ActionScript application

For a Flex project with MXML files, it is obvious how to set the width and height of the project:

<mx:Application width="300" height="200">

But for pure-ActionScript projects, it isn't so obvious. The way to do it is to use the SWF metadata attribute above the declaration of the class:

package
{
  [SWF(width="300", height="200")]
  public class MyApp extends Sprite
  {
    ...
  }
}

The values specified there are pixel sizes; in this context, you are not allowed to use percentage values such as 100%.

Next Page »