Pascal Scripting: Debugging

The Compiler IDE contains an integrated run-time debugger to debug your custom Pascal script, accessed via the Run menu. This debugger works very much like debuggers in other IDE's and uses the following menu items:

Run To Cursor (F4)

Runs or unpauses Setup until it reaches the line of the cursor, then pauses it.

Step Into (F7)

Runs or unpauses Setup until it reaches the next line, then pauses it. By continually pressing F7 you can follow the entire execution flow of Setup.

Step Over (F8)

Runs or unpauses Setup until it reaches the next line, then pauses it. Lines inside functions calls are skipped.

Step Out (Shift+F8)

Unpauses Setup until it reaches the end of the current function, then pauses it on the next line.

Toggle Breakpoint (F5)

Next time Setup reaches the line of the cursor, it pauses. There can be multiple breakpoints at once and breakpoints can be removed by pressing F5 again.

Pause

Next time Setup reaches any line, it pauses.

When Setup is paused variables and constants can be inspected by hovering the mouse over them.

To debug Uninstall instead of Setup first run Setup to completion then choose Target Uninstall (Ctrl+W) and finally use one of the above menu items.

Lines which can be paused on are marked by a gray square in the gutter. The square turns green the first time Setup reaches the line.

Besides lines in the Pascal script, lines in some other sections can also be paused on, again shown by a gray square in the gutter. For example, toggling a breakpoint on a line in the [Files] section will pause Setup when that file is about to be processed. On such lines Step Over and Step Out both act as Step Into.