IntelliJ IDEA 13.1.0 Web Help

Some features described here are available in Ultimate edition only.

Generally, you can use standard procedures to run and debug your ActionScript and Flex sources. However, there are differences that are pointed out below.

Run/debug configuration types

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

  • icon_flash Flash App configurations let you compile and then run or debug your Flash (ActionScript and Flex) applications. You can create the necessary configurations prior to running or debugging. You can also start running or debugging an application right in the editor, when working with your source code (see Running or debugging an application from within the editor).
  • icon_flexunit FlexUnit configurations let you compile and then run or debug your FlexUnit tests. See Testing ActionScript and Flex Applications.
  • icon_remote_flash_debug Flash Remote Debug configurations let you debug applications that have already been compiled and, if necessary, packaged, and are ready to be run on a local or remote computer, or a mobile device. See Using Flash Remote Debug configurations.

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+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+F9Shift+Alt+F6 or Shift+F6Ctrl+Shift+F10Control Shift RControl Shift F10Control Shift R) 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.

Note

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+F9Shift+F9Shift+F9Shift+F9Shift+F9Shift+F9Alt+F5Ctrl+F5Shift+Alt+D or Shift+F9Control DShift F9Command F11).

    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.

See Also

Concepts:

Procedures:

Language and Framework-Specific Guidelines:

Reference:

External Links:

Web Resources: