Running applicationsWhen you test your applications in Adobe® Flash® Builder™, you run the application SWF files in a web browser or the stand-alone Flash Player. If you encounter errors in your applications, you use the debugging tools to set and manage breakpoints in your code; control application execution by suspending, resuming, and terminating the application; step into and over the code statements, select critical variables to watch, and evaluate watch expressions while the application runs. About running and debugging applicationsAfter your projects are built into applications (see Building projects), you can run and debug them in Flash Builder. Use debugger version of Flash PlayerTo use the Flash Builder debugging feature, you must run the debugger version of Flash Player. This version is available as a browser plug-in or ActiveX control, or as a stand-alone version. This is the version that is installed with Flash Builder, but it is also available as a download from the Adobe web site. The installers for the debugger version of Flash Player are located in the flex_builder_install/Player directory. You can programmatically determine which version of Flash Player you are running by using the Capabilities.isDebugger() method. For more information, see Determining Flash Player version in Flex. Use launch configurations to run and debug applicationsA launch configuration defines the project name, main application file, and the path to the run and debug versions of the application. Flash Builder contains a default Flex application launch configuration that is used to create launch configurations automatically for each of your projects. For more information, see Managing launch configurations. Note: In the plug-in
configuration of Flash Builder, a launch configuration is not automatically
created for you. You need to create one the first time you run your application.
See Running your applications.
Customize launch configurationsYou can customize the launch configurations that Flash Builder creates automatically for you. For example, you can switch the main application file or modify the path to point to the SWF file rather than the HTML wrapper file so that you can run and debug your applications directly in the stand-alone Flash Player instead of a web browser. You can also create separate launch configurations for each of the application files in your project. For more information, see Creating or editing a launch configuration. Run and debug applications in a browser or the stand-alone Flash PlayerBy default, the launch configuration specifies that the run and debug paths point to the HTML wrapper files in the output folder of your project; therefore, your applications are run and debugged in Flash Player running in a web browser. Instead you can run and debug your applications in the stand-alone Flash Player (see Running the application SWF file in the stand-alone Flash Player). You can also override the system default web browser setting and run your applications in any browser you have installed (see Changing the default web browser). Note: The default security
settings for Internet Explorer 6 (or later) block applications launched
from Flash Builder. You can change your Internet Explorer security
settings by selecting Tools > Internet Options > Advanced
> Security > Allow active content to run in files on My Computer.
Or you can explicitly allow each Internet Explorer page to run after
it is blocked.
Run debugging tools from the code editorThe Flash Debug perspective provides all the debugging tools you expect from a robust, full-featured development tool. The debugging tools allow you to:
For more information about the Flash Builder debugging tools, see Debugging your applications. For more information about code editing, see About code editing in Flash Builder. Activate the Debugging perspective at a breakpointYou add breakpoints to executable lines of code in the code editor. When you begin a debugging session, the application runs until the first breakpoint is hit. The Flash Debug perspective is then activated and you can inspect the state of and manage the application by using the debugging tools. For more information, see Starting a debugging session. Compare debug and non-debug versions of your Flex applicationBy default, Flash Builder generates debug versions of your Flex application’s SWF file and stores them in your project’s bin-debug directory. This application is larger than the non-debug version because it includes additional code and metadata that the debugger uses. To generate a non-debug version of your Flex application, you can do one of the following:
Running your applicationsYour applications are run (and debugged) based on a launch configuration. When you create new Flex and ActionScript applications, a launch configuration specifies the location of the built applications files and the main application file. You can modify the launch configuration or create custom launch configurations. For more information, see Managing launch configurations. Running your projects opens the main application SWF file in your default web browser or directly in the stand-alone Flash Player. For information about changing the default web browser or running and debugging with the stand-alone Flash Player, see Changing the default web browser and Running the application SWF file in the stand-alone Flash Player. You can run your projects in a number of ways in Flash Builder. For example, you can use the Run command, which is available from the workbench main menu and toolbar, from the Flex Package Explorer, and code editor pop-up menus. Note: The Run button has two elements: the main action
button, and a pop-up menu that shows the application files in the
project that can be run or debugged. When you click the main action
button, the default application file is run. Alternatively you can click
the pop-up menu and select any of the application files in the project
and create or edit a launch configuration in the Create, Manage,
and Run Configurations dialog box.
Run project with default Flex application launch configuration
You can run and debug any project files that have been set as application files. For more information see Managing project application files. Create custom launch configuration
Run other application files in your project
Run a custom launch configuration
In the Create, Manage, and Run Configurations dialog box, select an existing custom launch configuration or create a new one. See Managing launch configurations. The Run command works a bit differently in the plug-in configuration of Flash Builder. Instead of running the currently selected project, it runs the most recently launched configuration. You can also select from a list of recently launched configurations. Managing launch configurationsLaunch configurations are used both to run and to debug applications. Flash Builder provides a default launch configuration for Flex and ActionScript applications. When you first run or debug a project, a project-specific launch configuration is created. You edit the launch configuration to change the default main application file. You can also modify the default launch path to run or debug in the stand-alone Flash Player rather than in a web browser. Creating or editing a launch configurationWhen you create and build a project, it is ready to be run or debugged. Both running and debugging of the applications in your project are controlled by a launch configuration. By default, Flash Builder creates a launch configuration for each of the application files in your project the first time you run or debug them. The configurations are based on the default Flex application configuration, and you can edit them as necessary. Launch configurations are managed in the Create, Manage, and Run Configurations dialog box. Access and edit a launch configuration
Creating launch configurations for desktop applicationsYou can create launch configurations for desktop applications to override the default configurations provided by Flash Builder. When you create or edit a launch configuration for a desktop application, you specify command line arguments, a Publisher ID, a profile and screen size parameters. For desktop applications, Profile can be either desktop or extendedDesktop. To create a launch configuration:
Running the application SWF file in the stand-alone Flash PlayerYour applications are run or debugged in the default web browser. You can change the default web browser to use run and debug applications (see Changing the default web browser). You can also choose to run and debug your applications in the stand-alone Flash Player by making a simple change to the launch configuration. Run and debug applications in the stand-alone Flash Player
Changing the default web browserFlash Builder uses the system default web browser when running and debugging applications. While you cannot set each launch configuration to use a specific web browser, you can change the workbench web browser setting, which affects how all of your applications are run and debugged. Change the default web browser
|
|