Chapter 25. Compiling and Debugging
Compiling Flex applications is most often done through Flex Builder or through invoking the MXML compiler (mxmlc) on the command line, but there are many other tools that let you compile an application, move files, or invoke applications. Tools such as make, Ant, or Rake, for example, enable you to simplify an entire compilation and deployment routine so that you can invoke it from a single command.
Debugging in Flex is done through the debug version of the Flash
Player, which enables you to see the results of trace
statements. With Flex Builder 3, you can
step through code line by line and inspect the properties of variables.
Flex Builder 3 also introduces a new profiling view that lets you examine
memory usage and the creation and deletion of objects. Outside of Flex
Builder, numerous open source tools expand your options. With Xray and
Console.as for Firebug, for example, you can inspect the values of
objects, or you can view the output of trace
statements with FlashTracer or the Output
Panel utility instead of using the Flex Builder IDE. The recipes in this
chapter cover debugging with both the tools provided in Flex Builder as
well as tracing values and inspecting objects by using Xray and
FlashTracer.
25.1. Use Trace Statements Without Flex Builder
Problem
You want to create trace
statements that will assist you in debugging your application, but you
do not have Flex Builder 3.
Solution
Download and use one of the many open source tracing tools ...
Get Flex 3 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.