开发者

Flex debug see object details

Does anyone kn开发者_如何学Cow how I can see my object details as in an array or some sort while debugging instead of [Object object]?

Thanks


If you are using Flex Builder or Flash Builder, you could add the object to the Expressions tab. When you're debugging you can drill down into the properties of any object or class you've added to the 'Expressions' tab.

To add your object to the Expressions tab:

  1. Highlighting your object you want to add and right-click.
  2. Select "Create Watch Expression".
  3. Add a breakpoint in your app wherever you need to view your object's details.


Short answer, no. All classes, views, etc are objects and this is how the toString() function works. If you want to see the internals of the object, you need to override the toString() function and add your own bit of code to show the internals.

Another way of doing it would be to use describeType function to look inside the class, get the properties and then show those properties and their values using a utility class. However, this is extremely slow compared to using the toString approach.

Personally, if I really want to know the values of my objects, I just use the debugger.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜