Testing a movie > Using the Debugger > Debugging a movie from a remote location |  |

Debugging a movie from a remote location

You can debug a remote Flash movie using the stand-alone, ActiveX, or plug-in versions of the Flash Player. When exporting a Flash movie, you can enable debugging in your movie and create a debugging password. If you don't enable debugging, the Debugger will not activate.

To ensure that only trusted users can run your movies in the Flash Debug Player, you can publish your movie with a debugging password. As in JavaScript or HTML, it's possible for users to view client-side variables in ActionScript. To store variables securely, you must send them to a server-side application instead of storing them in the movie. However, as a Flash developer, you may have other trade secrets, such as movie clip structures, that you do not want revealed. You can use a debugging password to protect your work.

When you export, publish, or test a movie, Flash creates a SWD file that contains debug information. To debug remotely, you must place the SWD file in the same folder as the SWF file on the server.

Note: You cannot debug a movie from Flash Player 5 in the Flash MX authoring application. You cannot debug a movie from Flash Player 6 in the Flash 5 authoring application.

To enable remote debugging of a Flash movie:

1 | Select File > Publish Settings.
2 | On the Flash tab of the Publish Settings dialog box, select Debugging Permitted.
3 | To set a password, enter a password in the Password box.
| Once you set this password, no one can download information to the Debugger without the password. However, if you leave the password field blank, no password is required.
4 | Select one of the following commands:
| Control > Debug Movie
| File > Export Movie
| File > Publish Settings > Publish
| Flash creates a debugging file with the file extension .swd and saves it alongside the SWF file. The SWD file contains information that allows you to use breakpoints and step through code.
5 | Place the movie's SWD file in the same directory as the SWF file on the server.
| If the SWD file is not in the same directory as the SWF file, you can still debug remotely, but the Debugger will ignore breakpoints and you won't be able to step through code.
6 | In Flash, choose Window > Debugger.
7 | In the Debugger, from the Options pop-up menu, select the Enable Remote Debugging option.

To activate the Debugger from a remote location:

1 | Open the Flash authoring application.
2 | In a browser or in the stand-alone player, open the published movie (the SWF file) from the remote location.
| The Remote Debug dialog box appears.
| If that dialog box doesn't appear, Flash couldn't find the SWD file. In that case, right-click (Windows) or Control-click (Macintosh) in the movie to display the context menu, and select Debugger.
3 | In the Remote Debug dialog box, select Localhost or Other Machine:
| Select Localhost if the Debug player and the Flash authoring application are on the same computer.
| Select Other Machine if the Debug player and the Flash authoring application are not on the same computer. Enter the IP address of the computer running the Flash authoring application.
4 | When a connection is established, a password prompt appears. Enter your debugging password if you set one.
| The display list of the movie appears in the Debugger.