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.

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

Debug Scripts<br />

• Click to remove all watches.<br />

Modify Preferences in Debugger<br />

The Debugger lets you change preferences as you work in the Debugger. Select the Options tab to find the<br />

following settings:<br />

Show Line Numbers<br />

Shows or hides the line numbers for the script in the Debugger.<br />

Break on Multiple Statements Per Line<br />

line.<br />

Stops executing the script between each expression in a single<br />

Break On Throw Breaks when the script executes the Throw() function. For example, Throw() might<br />

be enclosed in a Try() expression. The Debugger breaks on Throw() instead of continuing through<br />

the rest of the expression. This lets you identify where the problem occurred in the script and then<br />

return to debugging.<br />

Break On Execution Error<br />

Debugger.<br />

Stops executing the script when the error occurs rather than closing the<br />

Warn On Assignment In Condition Shows a warning when you enter a breakpoint condition that<br />

contains the assignment. For example, if you have a breakpoint on x = 1 and add the condition x = 1<br />

to the breakpoint, you are prompted to verify the assignment of x.<br />

Persistent Debugger Sessions<br />

JMP saves all breakpoints and watches until you delete them. Other user-specific settings, such as column<br />

widths on the tabs and the Debugger window size, persist between sessions of JMP.<br />

These settings are stored in a file named JMP.jdeb, the location of which is defined in the USER_APPDATA<br />

variable:<br />

• Windows 7 and Vista: "/C:/Users//AppData\Local/<strong>SAS</strong>/JMP//"<br />

• Windows XP: "/C:/Documents and Settings//Local Settings/Application Data/<strong>SAS</strong>/JMP/<br />

/"<br />

• Macintosh: "/Users//Library/Application Support/JMP//"<br />

As usual, the values of local variables, global variables, and namespaces clear when you close and<br />

reopen JMP.<br />

Examples of Debugging Scripts<br />

This section includes examples of setting breakpoints to watch variables; stepping into, over, and out of<br />

expressions; watching variables in different scopes and namespaces; and debugging interactive scripts.<br />

Example scripts are located in the Samples/Scripts folder.<br />

Tip: Make sure that Show Line Numbers is selected on the Debugger Options tab before proceeding.

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

Saved successfully!

Ooh no, something went wrong!