Adobe Flex 3 Help

Managing launch configurations

Launch configurations are used both to run and to debug applications. Flex 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 configuration

When 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, Flex 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.

Create, manage, and run configurations dialog box

Access and edit a launch configuration

  1. In the Flex Navigator view, select a project.
  2. With a project file open in the code editor, open the Create, Manage, and Run Configurations dialog box. The way to do this depends on your Flex Builder installation.
    • Stand-alone Flex Builder: Select the project and then select Run > Run > Other or Run > Debug > Other.
    • Flex Builder plug-in with Eclipse 3.2: Right-click (Control-click on Macintosh) to display the context menu and select Run As > Run or Debug As > Debug.
    • Flex Builder plug-in with Eclipse 3.3: Right-click (Control-click on Macintosh) to display the context menu and select Run As > Open Run Dialog or Debug As > Open Debug Dialog.
  3. Select the launch configuration to edit.

    A number of configurations may be listed if you have other projects in the workspace, if you have set other project files as application files, or if other Eclipse plug-ins are installed.

    By default, the first time you run a project, Flex Builder creates a project-specific launch configuration, which is based on the default Flex application launch configuration.

    You can edit application-specific configurations. You can also create new a launch configuration or base a new configuration on an existing configuration.

  4. Modify the configuration preferences as needed, and click Run or Debug.

Running the application SWF file in the stand-alone Flash Player

Your 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

  1. From the Create, Manage, and Run Configurations dialog box, select the launch configuration you want to modify.
  2. In the Main tab, deselect Use Defaults.
  3. In either or both of the Run and Debug paths, click Browse.

    The file selection dialog box appears and lists the contents of the build output folder.

  4. Select the application SWF file in the bin-debug directory. Do not select the SWF file in the bin-release directory, if there is one. This SWF file does not contain debug information.
  5. Click Open to select the file and return to the configuration dialog box.
  6. Apply your changes and use the modified configuration to run or debug the application.

Changing the default web browser

Flex 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

  1. Open the Preferences dialog and select General > Web Browser.

  2. Select a web browser from the list of web browsers installed on your system.

    Note: The Use Internal Web Browser option does not apply to running and debugging applications. Applications are always run and debugged in an external web browser.

    You can also add, edit, and remove browsers from the list.

  3. Click OK to apply your changes.