I don't know how I never knew about this, but the ExtendScript Toolkit that comes with the Adobe Creative Suite is really useful. I've done some scripting of Illustrator in the past and it took a bit of work looking up the various objects and their relationships. With the ExetendScript Toolkit you can see and examine the objects that are active, drill down into them, to make your script writing much easier. It is a debugger to boot.
Note that the Adobe Updater does NOT update the ExtendScript Toolkit. After discovering it, I did a quick web search and found that the latest version is 1.0.3 and I was running 1.0 (even after running the Adobe Updater).
You can download the latest version here.