Before I stareted developing applications in Flex, I was primarily a ColdFusion developer (and still am). OK, there was that brief time when I used PHP, but I was going through a ‘phase’. I missed the seemingly mythical debugger in earlier versions of ColdFusion, so when I started developing Flex applications, the debugger was just this thing in the toolbar that had a nifty little button, but I was really not to sure what to do with it.
Once I started to understand how to use the debugger, I learned that the debugger is my best friend and one of the greatest learning tools for Flex. Here’s an example. A little bit a go, a friend asked me a question about <mx:tilelist> and if you could figure out what row and column an item was in. Not knowing for sure, I opened up an application I knew had a tileList and added an ‘itemClick’ property which called a method I created. I added a breakpoint to the method and debugged the application. I found more information about the tileList than I could ever want. By looking at the ‘target’ of the mouse event, I discovered some properties I never knew existed, such as rowCount and ColumnCount. Using this information and the slectedIndecies you can easily figure out the row and column for any selected item.
Don’t just use the debugger when you have a problem, use it to learn more about Flex and its components. Let it become your best friend, it truly is one of the more powerful tools Flex developers have.