Guides

Scripts

Debugging scripts

A script runs a whole bar in one go, so the debugger records the bar where it stops and lets you walk through that recording: forward and back, into calls and out of them.

Breakpoints

Click left of a line number, or press F9 on the line, to set a breakpoint. Debugger lists them, and removes them one by one.

Start

Debug (F5) runs the script on the last bars of the chart in front, on its market and interval, and stops on the first bar that reaches a breakpoint. The layout needs a chart.

While you debug, the editor is read-only, and only one script is debugged at a time.

Steps

Continue · F5
To the next breakpoint.
Step over · F10
To the next line, over the calls of this one.
Step into · F11
Into the function the line calls.
Step out · Shift+F11
Back to the line that called this function.
Step back · Shift+F10
To the step before, back to the start of the bar.
Stop · Shift+F5
Ends the session.

What you see

At each step, Debugger shows the bar and the line, the calls in progress, and the value of every variable in sight.