Additional resources
Article: Understanding ActionScript 3 debugging in Flash (Adobe.com)
Article: Introducing the ActionScript 3 debugger (Adobe.com)
Video: Mobile device debugging via USB (Adobe.com)
The way you begin a debugging session depends on the type of file you are working on. During a debugging session, Flash interrupts the execution of ActionScript when it encounters a breakpoint or a runtime error.
When Flash initiates a debug session, it adds special information to the SWF file that it exports for the session. This information allows the debugger to provide the specific line numbers in the code where errors are encountered.
You can include this special debugging information in all SWF files created from a specific FLA file in the Publish settings. This allows you to debug the SWF file even if you do not explicitly initiate a debug session. This debugging information makes the SWF file slightly larger.
Choose Debug Debug Movie and then choose one of the following:
Flash Professional
AIR Debug Launcher (Desktop)
AIR Debug Launcher (Mobile)
on Device via USB (CS5.5 only)
All debug sessions will take place in the environment you choose. You can change the default environment at any time.
Add breakpoints to ActionScript code to interrupt the execution of the code. After execution is interrupted, you can step through and execute the code line by line, view different sections of your ActionScript, view the values of variables and expressions, and edit variable values.
Note:
Breakpoints cannot be added to ASC (ActionScript for Communication) or JSFL (Flash JavaScript) files.
After the ActionScript execution is interrupted at a breakpoint or runtime error, you can step through the code line by line, choosing to step into function calls or step over them. You can also choose to continue executing the code without stepping.
When code execution stops in the debugger, you can view the call stack in the Debug Console and display the scripts containing the functions in the call stack. The call stack shows the current list of nested function calls that are waiting to complete execution.
You can view the individual scripts that contain each function.
Show Constants displays the values constants (variables having a fixed value).
Show Statics displays variables that belong to the class, rather than to instances of the class.
Show Inaccessible Member Variables displays variables that are not accessible to other classes or namespaces. This includes variables that are protected, private or internal to the namespace.
Show Additional Hexadecimal Display adds hexadecimal values wherever decimal values are displayed. This is mainly useful for color values. Hexadecimal values are not displayed for decimal values from 0 through 9.
Show Qualified Names displays variables types with both the package name and the class name.
Control the types of compiler warnings that the ActionScript compiler generates in the Compiler Errors panel. When the compiler reports an error, double click the error to navigate to the line of code that caused the error.
When Flash encounters an error in ActionScript code, either during compiling or execution, it reports the error in the Compiler Errors panel. Navigate to the line of code that caused the error from the Compiler Errors panel.
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.
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.
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.
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.

