This code recursively parses the ActionDescriptor, ActionList, ActionReference types and outputs it to a TextArea in a somewhat pretty format.

Useful for debugging if you want to peek at the entire DOM or just a small part..

For instance, to peek at the DOM (note: will output a lot of info) ...
Code: Select allvar ar4:ActionReference = new ActionReference();
ar4.putEnumerated(phClassApplication, phTypeOrdinal, phEnumTarget );
var desc4:ActionDescriptor = Photoshop.app.executeActionGet(phEventGet, ar4);
// first arg is your textArea name (debug in this case)
// second arg should be zero, third argument, is the indent spacing between children
recursiveParseDesc(debug, 0, 2, desc4);