Next: , Previous: backtrace, Up: Commands


4.2 The Command break

If you want to stop the rules at a specific point, for example to take a look at the variables, you can use the command break to set breakpoints. A breakpoint is a point in the rule source text where rule execution is interrupted, so you can enter commands in debug mode. Breakpoints are only active in debug mode, this means you have started rule execution by a debug command or you have continued rule execution by one of the commands step, next, walk, or continue.

Behind the command name, break, you can give one of the following arguments:

A line number.
A breakpoint is set at this line in the current source file. If there is no statement starting at this line, the breakpoint will be set at the nearest line where a statement starts. You can, for example, set a breakpoint at line 245 in the current source file by entering the command
          break 245

A file name and a line number.
A breakpoint is set at this line in this file. If there is no statement starting at this line, the breakpoint will be set at the nearest line where a statement starts. An example:
          break english.syn 59

A rule name.
A breakpoint is set at the first statement in this rule. An example:
          break final_rule

If the rule name or the file name is ambiguous, you can insert an abbreviation for the rule system you refer to. Put it in front of the rule name or the file name. The following abbreviations are used:

If you omit any argument, the breakpoint is set on the current line in the current file (this is helpful in debug mode).

Every breakpoint gets a unique number once it has been set, so you can delete it later, when you do not need it any longer.

You can list the breakpoints using the command list and delete them using delete.