开发者

Debug AS3 in Flash CS4, how to watch a variable?

I am debugging AS3 in Flash CS4, a variable becomes NULL but I don't know who changes it at when. Is it possible to wa开发者_开发问答tch this variable and when the value changes to null, it stops?

Thanks. Bin


This is a wild guess, because I've never thrown an error (on purpose) in AS3. Can you change the property to as setter and then insert:

public var function set myVar(v:*):void{
    if(v == null){
        throw new Error("Its null!")
    }
    _myVar = myVar;
}


from top menu: window > debug panels > variables. That should make a huge list of variables visible.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜