ADOBE FLEX BUILDER 3
Using Adobe Flex Builder 3
158
Using the profiler
The profiler requires Flash Player version 9.0.115 or later. You can profile applications that were compiled for Flex 2,
Flex 2.0.1, and Flex 3. You can use the profiler to profile ActionScript 3.0 applications that were built with Flash
Authoring, as well as Adobe® AIR™ applications.
The profiler requires debugging information in the application that you are profiling. When you compile an appli-
cation and launch the profiler, Flex Builder includes the debugging information in the application by default. You
can explicitly include debugging information in an application by setting the
debug compiler option to true. If you
export an application by using the Export Release Build option, the application does not contain debugging infor-
mation in it.
Starting, stopping, and resuming the profiler
You can profile applications that you are currently developing in Flex Builder. Flex Builder includes debugging infor-
mation when it compiles and runs an application during a profiling session. You can also profile external applications
that you are not currently developing in Flex Builder but whose SWF file is available with a URL or on the file system.
To profile an application, the applications SWF file must include the debugging information. For more information,
see “Profiling external applications” on page 164.
Start profiling a Flex application
1 Close all instances of your browser.
2 Open your Flex application in Flex Builder.
3 Click the Profile application_name button in the main toolbar. Flex Builder informs you that you should close all
instances of your browsers if you have not already done so.
4 Click the OK button. Flex Builder compiles the application and launches it in a separate browser window. Flex
Builder also displays the Configure Profiler dialog box.
5 Select the options in the Configure Profiler dialog box and click Resume. To profile an application, you must
select the Enable Memory Profiling option or the Enable Performance Profiling option.
The following table describes the options:
Setting Description
Connected From Shows you the server that you are launching the application from. If the application is running on
the same computer as the profiler, this value is localhost. You cannot change this value. However,
you can profile an application that is running on a separate computer.
Application Shows you which application you are about to profile. You cannot change this value.
Enable Memory Profiling Instructs the profiler to collect memory data. You use this option to detect memory leaks or find
excessive object creation.
If you are doing performance profiling, you can deselect this option.
The default value is that the option is selected.
Watch Live Memory Data Instructs the profiler to display memory data in the Live Objects view while profiling. This is not
required for doing either memory or performance profiling. You can select this option only if you
selected Enable Memory Profiling.
The default value is that the option is selected.

Get ADOBE® FLEX® BUILDER™ 3: USING ADOBE FLEX BUILDER 3 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.