Adobe Flex 3 Help

Debugging modules in Flex Builder

To debug modules and applications, you must include debug information in the SWF files when they are compiled. To do this in Flex Builder, you just run the application, because debug information is included by default. On the command line, you set the debug compiler option to true. The default is true, but if you disabled it in a configuration file, you must be sure to override it.

By default, Flex Builder builds a single SWF file that includes debug symbols, so both Run and Debug work when you execute an application that uses modules in Flex Builder. However, including debug symbols in a module's SWF file makes the SWF file larger. To exclude debug symbols prior to deployment, you must disable debugging for the application's modules. To do this, you export the release version of the modules by selecting Project > Export Release Build.

To exclude debugging information from SWF files in Flex Builder, you can either set the debug option to false in the Additional Compiler Arguments text box, or you can output the SWF files by using the Export Release Build feature, which generates nondebug SWF files. This includes the modules, if those modules are in the current project.

If you create a separate project for your modules, you can enable or disable debugging for the entire project, without changing the settings of your main application.

When you want to debug a module, you must also debug the application that loads the module. The Flex debugger will not connect to an application that does not contain debug information, even if the modules that the application loads contain that information. In other words, you cannot exclude debug information from the application if you want to debug the module that the application loads.

When you're using modules in an AIR application, the module SWF must be located in the same directory as the main application SWF or one of its subdirectories.