开发者

FlexBuilder debugger: what can the "expressions" tab be used for?

A开发者_如何学Gos the title suggests, is there any documentation on the FlexBuilder "expressions" tab, and what expressions it can accept?

As far as I can tell, it can show the value of variables, but that's it: comparisons, function and method calls all fail:

alt text http://img.skitch.com/20100614-t1gpdbrn1qnwy2eqr3gnw54d1d.png

Edit: this is specific to FB3 — Flex Builder. Apparently FB4 — Flash Builder — is slightly less incompetent.


It depends if you're using FlexBuilder 3 or FlashBuilder 4. FB 3 has pitiful expressions capability. You can basically access variables and their member properties, period. And not always all the member properties.

FB 4 gives you the ability to evaluate real expressions, like

getStyle("vertical-align")
getStyle("vertical-align") + "foo" 
parseInt(getStyle("padding-left"))

etc.


It shows the values of variables, and the results of expressions as at the current breakpoint in the debugger.

eg:

public function testMethod():void {
   var a:String;  // <-- Set breakpoint here
   a = "Hello";
   a = "World";
}
public function testMethodB():void {
   var b:String = "Another String";
}

You can create an expression for a and watch the value change over time.

However, the variable must have a value within the context. For example, setting the breakpoint where indicated, and defining an expresssion for b would show an error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜