You can view the log inside the script window by right-clicking and selecting Show Embedded Log. This option makes it easy to edit and run a script, quickly see the results of your changes, and then continue to develop the script.
The embedded log always appears in the Scripting Index script window but is not available in Application Builder and the Debugger.