Debug a remote ActionScript 2.0 SWF file

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.

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

  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. To set a password, enter a password in the Password box.

    After you set this password, no one can download information to the Debugger without the password.

  5. Close the Publish Settings dialog box, and select one of the following commands:
    • Debug > Debug Movie

    • File > Export > Export Movie

    • File > Publish

      Flash creates a debugging file, with the extension .swd, and saves it in the same directory as the SWF file. The SWD file is used to debug ActionScript, and contains information that lets you use breakpoints and step through code.

  6. Upload the SWF file and the SWD file to the same directory on your web server, or leave it on the local machine to perform a remote debug session on the localhost.

    If the SWD file is not in the same directory as the SWF file, you can still debug remotely; however, the Debugger has no breakpoint information, so you can’t step through code.

  7. In Flash, select Debug > Begin Remote Debug Session > ActionScript 2.0.

    Flash opens the ActionScript 2.0 Debugger panel 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.

  8. 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.

    The debug session begins when the debug player connects to the Flash ActionScript 2.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 2.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 or Other Machine:
    • Select Localhost if the debugger version of Flash Player and the Flash authoring application are on the same computer.

    • Select Other Machine if the debugger version of Flash Player and the Flash authoring application are not on the same computer. Enter the IP address of the computer running the Flash authoring application.

  5. Enter your debugging password if you set one.

    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.

  This page on the Web