Flex2 Debug Component

1/29/06 Update: I've updated this component for Flex 2.0.1. Go ahead and download the 1.0.5 version of the Flex Components for the update.

Last week, at CFUnited, I showed off debug component for Flex2 development. As promised here is a download of the .swc and source code. Remember this is a work in progress but it is far enough along to be useful now. Keep watching this blog for updates.

What is this debug component?

First let me step back, Flex2 has a useful debug utility class and method called ObjectUtil.toString(). For those of you use to ColdFusion and the CFDUMP tag, this is a flex version of the same thing. However there is no way to easily view this data, I found myself doing a lot of Alerts, such as this: Alert.show(ObjectUtil.toString(event)); However, This works for the small stuff but not for large items, The Alert box doesn't grow to fit things like I would like.

The 2nd problem, was that ColdFusion FlashRemoting requests return a lot of debug information about the request and there is no good way to make sense of it. So to kill two birds with one stone I put this component together.

How to use it:

In your Flex project; go to the project properties panel (Right-Click on the project), select the "Flex Build Path" page, select the "Library Path" tab, then add the .swc file to the project. Once this is done you can import and call the Debug class as needed.

Syntax:

The Debug component can be used in a few different ways, to view a single item or to debug multiple items. The single item example:


Debug.show(anyObject);

You can also add multiple items and view them later.


Debug.add(anyObject);
Debug.add(anotherObject);

//then later, perhaps in a button click handler

Debug.show();

Some screen shots:

The ColdFusion debug data:

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
walt's Gravatar help! I'm using Flex Builder 3 (beta), and the debug component seems to be broken.
# Posted By walt | 12/3/07 12:40 AM
robert's Gravatar After adding the .SWC to the project, importing com.mikenimer.components.*; and calling Debug(someObj);
I'm getting the following error when trying to compile. "1024: Overriding a function that is not marked for override." on the SizeableTitleWindow.as. Using Flex 2.0.1

Any Ideas what I'm doing, or not doing?
# Posted By robert | 12/7/07 8:26 PM
MArcio's Gravatar I'm using Flex Builder Version 3 Beta 2

I create a flex project named teste and in Library Path i add SWC file named nimerComponents.swc

But mode Design in Flex Builder not functional

What should I do?
# Posted By MArcio | 12/14/07 2:44 PM
[Home]