Understanding the debugger

This is an introduction to the integrated debugger.

The debugger is a feature built in to the runtime system (fglrun) that allows you to control the execution of a program step by step, so that you can find logical and runtime errors.

There are three debug modes possible with the Genero runtime system:
  1. Start the fglrun program from the command line with the -d option. For more details, see Starting fglrun in debug mode.
  2. Attaching with the fgldb tool, to a running fglrun process, for debugging through a TCP socket. For more details, see Attaching to a running program.
  3. Connect directly with the fgldb tool, to the debug TCP port of a runtime system running on a mobile device in standalone mode. For more details, see Debugging on a mobile device.

The debugger supports a subset of the standard GNU C/C++ debugger called gdb.

In command line mode, the debugger shows the following prompt
(fgldb)
A command is a single line of input. It starts with a command name, which may be followed by arguments whose meaning depends on the command name. For example, the command step accepts as an argument the number of times to step:
(fgldb) step 5
You can use command abbreviations. For example, the 'step' command abbreviation is 's':
(fgldb) s 5

Possible command abbreviations are shown in the command's syntax.

A blank line as input to the debugger (pressing just the RETURN or ENTER keys) usually causes the previous command to repeat. However, commands whose unintentional repetition might cause problems will not repeat in this way.