Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Date Date
Qty:
Subtotal
Promotions
Estimated Shipping
VAT
Calculated at checkout
Total
Checkout
Flash Professional Help / 

Debugging ActionScript 3.0

Adobe Community Help


Products Affected

  • Flash Professional CS6

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

  • About the ActionScript 3.0 debugger
  • Enter debugging mode
  • Set and remove breakpoints
  • Step through lines of code
  • Display and examine scripts in the call stack
  • Display and modify variable values
  • Control compiler warnings
  • Navigate to errors in code
  • Debug a remote ActionScript 3.0 SWF file
  • Show All Show Less
To the top

About the ActionScript 3.0 debugger

Additional resources

The following resources provide additional detailed information about debugging ActionScript 3.0:

  • 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)

To the top

Enter debugging mode

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 a default debugging environment

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

Start debugging from a FLA file

  • Select Debug > Debug Movie > Debug.

Start debugging from an ActionScript 3.0 AS file

  1. With the ActionScript file open in the Script window, select the FLA file that the ActionScript file should be compiled with from the Target menu at the top of the Script window. The FLA file must also be open in Flash to appear in this menu.

  2. Select Debug > Debug Movie > Debug.

Add debugging information to all SWF files created from a FLA file

  1. With the FLA file open, select File > Publish Settings.

  2. In the Publish Settings dialog box, click the Flash tab (CS5) or Flash category (CS5.5).

  3. Select Permit Debugging.

Exit debugging mode

  • Click the End Debug Session button in the Debug Console.

To the top

Set and remove breakpoints

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.

Set a breakpoint

  • In the Actions panel or Script window, click in the left margin next to the line of code where you want the breakpoint to appear.

Remove a breakpoint

  • In the Actions panel or Script window, click on the breakpoint to remove.

To the top

Step through lines of code

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.

Step into code line by line

  • Click the Step In button in the Debug Console.

Step over a function call

  • Click the Step Over button in the Debug Console.

Step out of a function call

  • Click the Step Out button in the Debug Console.

Resume normal code execution

  • Click the Continue button in the Debug Console.

To the top

Display and examine scripts in the call stack

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.

  • In the Debug Console panel, double click the name of the script in the call stack.
To the top

Display and modify variable values

View and edit the values of variables and properties in the Variables panel.

View a variable value

  1. In the Variables panel, select the types of variables to display from the Panel menu.

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

  2. Expand the tree view of the object structure of the FLA until you see the variable to view.

Edit the value of a variable

  1. In the Variables panel, double click on the value of the variable.

  2. Enter the new value for the variable and press Enter. The new value is used during subsequent code execution.

To the top

Control compiler warnings

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.

  1. Select File > Publish Settings.
  2. Click Flash.
  3. Click the ActionScript Settings button.
  4. Select among the Errors options:
    • Strict Mode reports warnings as errors, which means that compilation will not succeed if those errors exist.
    • Warnings Mode reports extra warnings that are useful for discovering incompatibilities when updating ActionScript 2.0 code to ActionScript 3.0.
To the top

Navigate to errors in code

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.

  • Double click the error in the Compiler Errors panel.
To the top

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. In the Publish Settings dialog box, click the Flash tab (CS5) or Flash category (CS5.5), and then 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.

    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.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement