Debugging a BDL Program

You can use the Genero graphical debugger or the fglrun -d command line debugger to search for programming errors.

The command line debugger is integrated in the runtime system. You typically start a program in debug mode by passing the -d option to fglrun .

The following lines illustrate a debug session with the simple.42m program:

fglrun -d simple.42m
(fgldb) break main 
Breakpoint 1 at 0x00000000: file simple.4gl, line 2.
(fgldb) run 
Breakpoint 1, main() at simple.4gl:2 
2         CALL sayIt()
(fgldb) step 
sayit() at simple.4gl:6 
6         DISPLAY "Hello, world!"
(fgldb) next 
Hello, world!
7     END FUNCTION
(fgldb) continue 
Program existed normally.
(fgldb) quit

This tutorial will not spend much time on the integrated debugger. To learn more, go to the Integrated debugger in the Genero Business Development Language User Guide.