Most scripts, when run, will implicitly or explicitly generate a result. This result is entered into the script window’s result drawer, in the top pane (the result pane) of the drawer.
A Debugger preference lets you set what happens when a script completes running (“Show result when scripts pause or end”):
An Editor preference lets you set whether the open or closed state of the result drawer should be remembered when a script is saved and restored when it is next opened.
The open or closed state of the result drawer is one of the window features that you can configure by setting the default state for all new script windows.
The result pane is a viewer, with many capabilities and view options. In particular, when the result is an object reference, the result pane in Best view is an explorer view. Script Debugger probes this object reference to obtain its elements and properties and their values when the result is generated. This feature is very informative and can reduce your script development time. So, for example, consider this script:
The result is the reference
Moreover, since this is an explorer, you can do all the things in the result pane that you can do in any explorer. Not only can you separate off the result pane itself as an individual viewer window (by choosing Script > Show Result in Viewer); you can separate off any entry within the result as an individual viewer window. You can drill down the hierarchy within the explorer, you can transfer references and values from the explorer to your script, you can ask for a dictionary definition, and you can even alter values in real time, thus affecting the running target application.