2019.1

Table Of Contents
l
Click the Debug Scripts button in the toolbar of the Scripts pane. The Script Debugger
will pause and accept input as soon as it processes the first script.
l
Right-click an enabled script in the Scripts panel and choose Debug from the contextual
menu. The Script Debugger will pause and accept input as soon as it processes the
selected script.
The Debugger simulates an output run with only the current record and appears as soon as the
merge engine processes the selected script, or the first script if no script was selected. You can
then add breakpoints and/or step through the code.
Meanwhile, the Workspace will display the partially merged document.
Scripts and call stack
The left side of the window displays a list of all enabled scripts that apply to the current context,
in the order in which they are expected to be processed.
If the selector of a standard script or post pagination script has no matches in the current
resource (Master Page or section) the script will be skipped.
If an error is thrown, the rest of the current script is skipped and execution continues with the
next script.
When execution is suspended the list includes the current call stack, including line numbers.
From top to bottom, frames are ordered from new to old. The current stack frame has an arrow
indicator. You will only see multiple stack frames if execution is suspended inside a function.
You can click a frame to make it the current frame. The Variables panel always reflects the state
of the current frame.
Source code
You can click any script at the left to view it in the source editor at the top right. An instruction
pointer in the left margin marks the current line.
The code is read-only, but clicking to the left of a line of code adds a breakpoint to it (except
when a line only contains a declaration). Note that breakpoints are discarded when the dialog
is closed.
Hovering over a variable in the code shows a tooltip with the value of that variable. The
variable can be nested, like fields in record.fields.
Page 909