Flash CS3 (Not your version?)

Debug a remote ActionScript 3.0 SWF file

With ActionScript 3.0, you can debug a remote SWF file by using the stand-alone, ActiveX, or plug‑in version of the Debug Flash Player, which you can find in the Flash install directory/Players/Debug/ directory. However, in the ActionScript 3.0 Debugger, remote debugging is limited to files located on the same localhost as the Flash authoring application, being played in the stand alone debug player, ActiveX control, or plugin.

To permit remote debugging of the file, enable debugging in the Publish settings. You can also publish your file with a debugging password to ensure that only trusted users can debug it.

As in JavaScript or HTML, users can view client-side variables in ActionScript. To store variables securely, send them to a server-side application instead of storing them in your file. However, as a developer, you may have other trade secrets, such as movie clip structures, that you do not want to reveal. You can use a debugging password to protect your work.

Enable remote debugging of a SWF file and set a debugging password

In ActionScript 3.0 FLA files, code in frame scripts cannot be debugged. Only code in external AS files can be debugged with the ActionScript 3.0 Debugger.

  1. Open the FLA file.
  2. Select File > Publish Settings.
  3. On the Flash tab of the Publish Settings dialog box, select Permit Debugging.
  4. Close the Publish Settings dialog box, and select one of the following commands:
    • File > Export > Export Movie

    • File > Publish

  5. Leave the SWF file on the local machine to perform a remote debug session on the localhost, or upload it to your web server.

    The SWF file contains no breakpoint information, so if you upload the file to a remote server you will not be able to step through code. Use the localhost to perform this task.

  6. In Flash, select Debug > Begin Remote Debug Session > ActionScript 3.0.

    Flash opens the ActionScript 3.0 Debugger and waits for a debug Flash Player to connect. You have 2 minutes to start the debug Flash Player. If more than 2 minutes elapse, repeat this step.

  7. Open the SWF file in the debug version of the Flash Player plugin, ActiveX control, or stand-alone player. The debug stand-alone player is located in the Flash install directory/Players/Debug/ directory. Do not connect to a file on another machine, as debugger will not be able to receive any breakpoint information.

    The debug session begins when the debug player connects to the Flash ActionScript 3.0 Debugger panel.

Activate the Debugger from a remote location

  1. Open the Flash authoring application if it is not already open.
  2. Select Debug > Begin Remote Debug Session > ActionScript 3.0.
  3. In a browser or in the debugger version of the stand-alone player, open the published SWF file from the remote location. Be sure the SWD file is in the same folder as the SWF file.

    If the Remote Debug dialog box does not appear, right-click (Windows) or Control-click (Macintosh) in the SWF file to display the context menu, and select Debugger.

  4. In the Remote Debug dialog box, select Localhost and select the file to open.

    The display list of the SWF file appears in the Debugger. If the SWF file doesn’t play, the Debugger might be paused, so click Continue to start it.

Take a survey