Advanced features / Program execution |
The BREAKPOINT instruction sets a program breakpoint when running in debug mode.
BREAKPOINT
Normally, to set a breakpoint when you debug a program, you must use the break command of the debugger. But in some situations, you might need to set the breakpoint in program sources. Therefore, the BREAKPOINT instruction has been added to the language.
When you start fglrun in debug mode with the -d option, if the program flow encounters a BREAKPOINT instruction, the program execution stops and the debug prompt is displayed, to let you enter a debugger command. The BREAKPOINT instruction is ignored when not running in debug mode.
MAIN DEFINE i INTEGER LET i=123 BREAKPOINT DISPLAY i END MAIN