IntelliJ IDEA 2016.2 Help

Running and Debugging ActionScript and Flex Applications

On this page:

For general guidelines, see Running and Debugging.

Run/debug configuration types

The following run/debug configuration types are available for Flash modules:

To be able to debug your applications:

  • The applications must be debug-ready, that is, contain the necessary debug information.
  • For Web-targeted applications, you must install the debugger version of Flash player or the debugger version of the Flash player plugin for your Web browser. Normally, this software is included in Flex SDKs.

    You can also download the corresponding software separately from the Adobe Flash Player Downloads page.

Running or debugging an application from within the editor

When working with the class source code in the editor, if appropriate, you can run or start debugging your application with the current class as the main application class. To do that, right-click somewhere in the editor area to open the context menu and select:

  • run Run "<class_name>" (Ctrl+Shift+F10) to run the application.
  • debug Debug "<class_name>" to start debugging the application.

If a Flash App run/debug configuration appropriate for the task already exists, this configuration is selected and used. Otherwise, a new run/debug configuration is created and saved as a temporary run/debug configuration. For details, see How IntelliJ IDEA selects or creates a class-specific run/debug configuration.

In addition to Run and Debug, the following related commands may be available depending on the situation:

  • icon_flash Create "<class_name>". If an appropriate run/debug configuration is not found, you can use this command to create a new run/debug configuration and make it current. (The Create Run/Debug Configuration dialog will open.)
  • icon_flash Save "<class_name>". If the corresponding run/debug configuration is available as a temporary configuration, you can use this command to save the configuration and thus make it permanent.
  • icon_flash Select "<class_name>". Use this command if you want to make the corresponding temporary or permanent run/debug configuration current.

All the functions described above may alternatively be accessed as the context menu commands in the Project or Favorites tool window.

How IntelliJ IDEA selects or creates a class-specific run/debug configuration

As already mentioned, when you run or debug your application from within the editor, IntelliJ IDEA first tries to find an existing run/debug configuration with the class you are currently working with as the main class.

If no such configuration is found, a new run/debug configuration is created.

If more than one configuration with the suitable main class is found, IntelliJ IDEA prioritizes the configurations according to the following conditions and select the one with the highest priority:

  1. The run/debug configuration is based on the active build configuration, the build configuration output type is Application, the main class is not overridden in the run/debug configuration.
  2. The run/debug configuration is based on a build configuration with the output type Application, the main class is not overridden in the run/debug configuration.
  3. The run/debug configuration is based on the active build configuration, the main class is overridden in the run/debug configuration.
  4. Any run/debug configuration with the suitable (overridden) main class.

When creating a new run/debug configuration, IntelliJ IDEA tries to find a build configuration with a suitable main class. If found, the new run/debug configuration will be based on such a build configuration. Otherwise, the active build configuration will be used, and the main class will be overridden in the new run/debug configuration.

Using Flash Remote Debug configurations

  1. Select and start the necessary Flash Remote Debug configuration (debug or Shift+F9).

    As a result, the Debug tool window opens; the debugger is waiting for the application to connect.

  2. Now, to connect to the debugger, do one of the following:
    • Start the Flash or AIR application on your local computer; the application will connect to the debugger automatically.
    • If the application is already running in a Web browser or a Flash player on the local or remote computer, right-click the corresponding page in the browser or the application in the player, and select Debugger from the context menu.
    • Start the application on the mobile device. If the device is capable of communicating with your computer, the application will connect to the debugger automatically.

Hiding or showing [SWF] and [UnloadSWF] debugger messages

Your Flash Player Debugger output may contain many [SWF] and [UnloadSWF] messages (the Console tab of the Debug tool window). There are situations when you don't want to see them.

You can hide or show the [SWF] and [UnloadSWF] messages by using filter on the toolbar.

Note that changing the state of this toggle doesn't change the current console content. That is, if you turn the filter on, the messages already present in the output won't be hidden. Only new messages won't be shown.

See Also

Last modified: 8 August 2016