break
The break
command defines a break point to stop the program execution
at a given line or function.
Syntax
break [
location ]
[
if condition ]
where location
is:
{
[
module.]
function
|
[
module:]
line
}
- module is the name of a source file, without extension.
- function is a function name.
- line is a source code line.
- condition is an expression evaluated dynamically.
Usage
The break
command
sets a break point at a given position in the program.
When the program is running, the debugger stops automatically at breakpoints defined by this command.
If a condition is specified, the program stops at the breakpoint only if the condition evaluates to TRUE.
If you do not specify any location, the breakpoint is created for the current
line. For example, if you write "break if var = 1
", the debugger adds a conditional
breakpoint for the current line, and the program will only stop if the variable is equal to 1 when
reaching the current line again.
Example
(fgldb) break main:5
Breakpoint 1 at 0x00000000: file main.4gl, line 5.
(fgldb) break main:10 if rec.pkey > 100
Breakpoint 2 at 0x00000000: file main.4gl, line 11.