ASDebugger

On this page you can download the latest version of the ASDebugger.

When you’re developing an Actionscript project – Flash or Flex – you cannot live without a decent debugger. Flex provides quite a good debugger and the Flash IDE has also a reasonable debugger. The problem with those debuggers is that you have to build explicitly for the debugger. So when you’re deploying on a remote server, you don’t have those debug options.

The ASDebugger allows you to trace variables. It has support for strings, integers, arrays, dates, arraycollections, objects and everything in between.

Version 2.x:

Version 2 of the ASDebugger makes it more than just a debugger. You’re now able to edit your objects and movieclips at run-time. Want to move your button 2 pixels to the left just to see how it fits there? No problem, just send it to the debugger and change it x value.

Features

  • Real-time debugging of objects;
  • Browsing the displaylist (list all the movieclips / sprites / displayobjects and all their children);
  • Sending debug statements;
  • Reordering of tabs, place it the way you want (the tabs displaylist, properties and console, have a drag and drop feature);
  • Just 1 swc in your project needed;
  • Works for both flash (AS3) and flex (version 2.0 and higher);
  • Copy output to clipboard;
  • Cross platform (download the swf file instead of the exe);
  • One debugger can handle multiple (unlimited) swf files.

Usage

  1. Download the swc file, and the exe or swf file.
  2. For flex, add the swc to your project (goto project -> properties -> flex build path -> library path. Choose ‘Add SWC’ and navigate to ASDebugger.swc.
  3. For flash, place the swc file in the components folder. Typically this is C:\documents and settings\{Username}\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\Components\. Open op flash and the Components window (CTRL + F7), click the little icon beneath the close button and hit reload if you don’t see it already. Drag the component to your library.
  4. Import the ASDebugger in your code (import nl.flexperiments.debug.ASDebugger;)
  5. Debug anything you want:
    1. For send a simple statement to the console window, type: ASDebugger.debug(<anything>);
    2. To send an item to explore the displaylist, type: ASDebugger.debug_displayobject(<any displayobject>);
    3. To explore the property of any object (including movieclips, displayobjects, etc.) type: ASDebugger.debug_prop(<any object>);
    4. To explore any object which is already in the displaylist panel, just double click on it (in the debugger that is)

Note: Currently, the debug_displayobject functionality works partially in flash. In flash, you can only send this.stage to this method, in flex you can send any displayobject)

For an example, see this post.

Download:

If you have any questions, leave a comment on one of the blogposts.