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.
- Start the fglrun program from the command line with the
-d
option. For more details, see Starting fglrun in debug mode. - Attaching with the fgldb tool, to an fglrun process running on the same machine, by using the process id. Note that with the graphical debugger of Genero Studio, a debug session with fgldb can be started on a remote server through ssh. For more details, see Attaching to a running program.
- 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.
(fgldb)
step
accepts as an argument the number of times to
step:(fgldb) step 5
(fgldb) s 5
Possible command abbreviations are shown in the command's syntax.
The debugger prompt provides command history and in-line editing capabilities, such as other command-line tools using the GNU readline library, as well as command and expression completion with TAB.
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.