Debugging a flow control script
Describes breakpoint management, call stack display, variable object examination, and stepping.
You are now going to learn how to debug a script. The debug features in the IDE are breakpoint management, call stack display, variable object examination, and stepping.
A simple debugging
scenario is to place a breakpoint in a script, execute the script
by means of the Debug button
, examine the call stack, and then
interactively execute statements using the Step Over button.
This section covers the successive debugging steps:
Adding a breakpoint to a flow control script
Still using the Solve models sequence by changing
data run configuration of the mulprod model,
you are going to add a breakpoint to set the debugging mode, then
execute the script again, using this time the Debug button.
Examining the flow control call stack
The call stack is now spread over two views: the Debug view, representing the call stack (showing nested function calls) and the Variables view, showing the content of the selected call frame.
Stepping to the next instruction
When you execute a run configuration in debugging mode, the Debug view is displayed to enable you to use the stepping buttons in its toolbar.

The Step Over button
allows you to step through the script instruction
by instruction, executing each instruction as you go. Use it to step
over:
a function and go to the statement after the function call
an instruction and go to the instruction after it
When you are stepping in a script, the blue arrow in the margin keeps track of the current position.
To step to the next instruction:
Continuing without stepping
in the toolbar of the Debug view.
The IDE executes the rest of the script without stopping at instructions. The possible outputs of the script are printed in the Scripting log.
Aborting execution
At any moment while you are stepping in the script, you can abort execution.
Ending execution
To summarize, while stepping through a script, you can end execution in one of three ways:
- Click the Continue
the current solve button
: the IDE completes the script. - Click the Abort the current solve button
: the script terminates without being completed.
- Click the Step Over button
(or Step Into button
, if there are no functions) repeatedly;
the IDE completes the script, instruction by instruction.
The output of execution is displayed in the Scripting log.





. 
would give the same behavior as
in the execution toolbar of the main window.
(You can also click the 