Mike Morearty
28 Jun 2006

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.

comments powered by Disqus