ASDebugger 2.0: A real-time debugger and editor

On September 16, 2008, Components,Flash,Flex - 7 Comments

Yeah! It’s here, the long awaited update for my debugger. And since I’ve added a lot of new functionality, I decided to raise the major version number (easy decision to make when you’re the only developer on the project :-P ). So, what does it do? Well, a small list:

  • Send traces / strings
  • Inspect objects, movieclips, displayobjects and alter their values.
  • Browse through the displaylist of any (flex or flash) application.

You can compare this tool with the debugging options and object inspector of flex, but you now have the possibility to edit all the objects’ variables (only strings, numbers and booleans though) in real time.

How does it work?

Easy!

  1. First, download the ASDebugger.swc and the ASDebugger as .exe or .swf (air version will follow on demand);
  2. Include the swc file in your flex or flash project;
  3. Place a debug statement like this: ASDebugger.debug_prop(<any object>) anywhere in your code;
  4. Fire up the debugger;
  5. Compile your project;
  6. See what it sends to the ASDebugger, change the values you want to change, see your changes immediately!

How do I get it?

You can download the neccessary files from the ASDebugger project page.

Is it free?

For now, yes. But I’m not sure if future versions will be.

I have a question / found a bug / want to request a feature

Please leave a comment on any of the ASDebugger related posts on this blog (this post for instance :-P ). Do let me know what you think!.

I wanna see an example!

Here you go:

Flex example Flash example ASDebugger 2.0


What others have to say:

1

Great job Ids!

Works like a champ…

This would be a great plug-in/panel in FlashDevelop

2

I totally agree on that one! That would be awesome! ;-)

3

It tried to use ASDebugger 2 on Flex 3.

I have this like Main.as:
package {
import flash.display.Sprite;
import flash.text.*;
import flash.events.*;
import nl.flplibrary.debug.ASDebugger;
public class Main extends Sprite {
public function Main():void {
// something code
}
// other functions
}
}
I tried to compile it with:
$ /path/to/flex/bin/mxmlc -library-path+=/path/to/swc/ASDebugger.swc Main.as

But the compiling fails due to error:
Error: Definition nl.flplibrary.debug:ASDebugger could not be found.

I putted the ASDebugger.swc to /path/to/swc/ASDebugger.swc.

What I’m doing wrong?

4

You’re using the wrong import path, it should be
import nl.flexperiments.debug.ASDebugger

5

Thanks. Changing the import path, the error disappeared, but other one appeared.

I have a command in Main.as:
// t is a textField
ASDebugger.debug_prop(t);

When launching the Main.swf, the following error appears:

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.LocalConnection was unable to invoke callback debug_prop. error=ArgumentError: Error #1063: Argument count mismatch on ASDebugger/debug_prop(). Expected 1, got 3.

6

Hmm, did you download the latest versions of both the Debugger and the SWC? Seems like you’re using the old debugger with the new SWC (which doesn’t work)

7

[...] For an example, see this post. [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Submit comment