Debug program - breakpoints

A breakpoint is a point in the program where execution is halted and control returned to the debug program. Breakpoints may be of two types: line breakpoints and function breakpoints.

Field breakpoints

A field breakpoint causes program execution to halt at the moment a field content is changed. All watched fields are field breakpoints, there is no other way to specify a field breakpoint.

Line breakpoints

A line breakpoint causes program execution to halt at a specified line in the source code. To set a line breakpoint, right-click on the source code to open the right-mouse menu. The first option, Add/Remove Line Break, is a toggle-type option that adds or removes a line breakpoint at the current line. The menu also contains options to remove all line breaks and to remove all breaks. Line breaks may also be toggled by clicking in the column labelled B at the start of the required line.

Line breakpoints are indicated in the source code by a B at the beginning of the line. Since Sculptor version 6.1.4 they can be saved at the end of a session. A permanent line breakpoint can also be set by editing the source code before running the debug program and prefixing the line with “_bp”.

Function breakpoints

A function breakpoint halts execution at every call to the function specified. It is equivalent to setting a line breakpoint on the first line in the function. Note, however, that the Settings screen enables the selection of event codes which, when generated, cause event function breakpoints to be skipped. This can also be applied to other function breakpoints and to line breakpoints. See Settings for full details.

To set a function breakpoint, click the Functions tab, then use the right-mouse menu Add/Remove Function Break option. The menu also contains options to remove all function breaks and to remove all breaks.

There is no visual indication of a function breakpoint in the source code.

Function breaks are saved at the end of a session provided that the Save Function Breaks on Exit option is checked (Settings tab).


The Sculptor debug program