14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

56 <strong>Scripting</strong> Tools Chapter 4<br />

Debug Scripts<br />

Show the Log in the Script Window<br />

You can view the log inside the script window by right-clicking and selecting Show Embedded Log. This<br />

option makes it easy to edit and run a script, quickly see the results of your changes, and then continue to<br />

develop the script.<br />

The embedded log always appears in the <strong>Scripting</strong> Index script window but is not available in Application<br />

Builder and the Debugger.<br />

Save the Log<br />

You can also save logs as text files, which can be viewed with any text editor. Double-clicking a log text file<br />

opens it in your default text editor, not in JMP.<br />

1. Make the log window active (click the Log window to make it the front-most window).<br />

2. From the File menu, select Save or Save As.<br />

3. Specify a filename, including the extension .txt on Windows.<br />

4. Click Save.<br />

Debug Scripts<br />

The JSL Debugger helps identify the point at which a script causes an error or fails. Rather than<br />

commenting out portions of the script or adding Print() expressions, you can use the Debugger to find<br />

the problem.<br />

In an open script, click the Debug Script button (or select Edit > Debug Script) to show the script in the<br />

JSL Debugger window. You can also use a keyboard shortcut:<br />

• Press CTRL + SHIFT + R (Windows).<br />

• Press SHIFT + COMMAND + R (Macintosh).<br />

Debugger Window<br />

The Debugger opens in a new instance of JMP (Figure 4.9). The original instance is inoperable until the<br />

script produces something that requires interaction. At that point, the Debugger window becomes<br />

inoperable until you perform whatever action is required. Then control is returned to the Debugger. Close<br />

the Debugger to work again in the original instance of JMP.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!