Lahey Fortran

Setting and Deleting Breakpoints

You can interrupt program execution by setting a breakpoint, allowing the program state to be examined. A breakpoint can only be set on an executable line of code; it cannot be set at a comment or variable declaration, for example.

Breakpoints can be set at any time the source code document is visible, either before or after debugging is started.

Setting a Breakpoint

To set a breakpoint at a line, position the mouse pointer on the left border at the line number in the source program and click the left mouse button. If the breakpoint has been set, a red ball will appear in the left margin at the line to break on. If the line is not a valid break point, the breakpoint is not set, and a message appears in the status bar.

A breakpoint can also be set as follows:

Move the mouse over the line to break then Right-click. Expand the "Breakpoints" item and select "Insert Breakpoint".

Setting a Break Count

Once a breakpoint has been set, it can be modified to only break after it has been hit a certain number of times. To set a break count, position the mouse pointer on the breakpoint marker (a red ball) and click the right mouse button. A context menu will appear:

Select "Hit Count...". The Breakpoint Hit Count dialog will be displayed allowing user to set the counting mode and break count.

Select "Hit Count...". The Breakpoint Hit Count dialog will be displayed allowing user to set the counting mode and break count.

Setting a Break Condition

Once a breakpoint has been set, it can be modified to only break if a certain condition is satisfied. To set a break condition, position the mouse pointer on the breakpoint marker (a red ball) and click the right mouse button. Expand the "Breakpoints" item and select "Condition...". The Breakpoint Condition dialog will be displayed allowing you to enter a logical (boolean) expression using Fortran syntax and the variables within the frame. The expression is tested when the breakpoint is hit, and the program will break if the expression evaluates to true.

Releasing Breakpoints

To delete a breakpoint at a line, position the pointer on the breakpoint marker and click the left button.

A breakpoint can also be deleted as follows:

Right-click the mouse when the pointer is on the breakpoint line. Expand the "Breakpoints" item and select "Remove Breakpoint".

To delete all breakpoints:

Open the "Debug" menu, then select "Delete All Breakpoints".