6.9.2 Using watches

When debugging information is compiled in the program, watches can be used. Watches are expressions which can be evaluated by the IDE and shown in a separate window. When program execution stops (e.g. at a breakpoint) all watches will be evaluated and their current values will be shown.

Setting a new watch can be done with the ”Debug—Add watch” menu command or by pressing Ctrl-F7. When this is done, the watch property dialog appears, and a new expression can be entered. The watch property dialog is shown in figure (6.13).



Figure 6.13: The watch property dialog

PIC


In the dialog, the expression can be entered. Any possible previous value and current value are shown.

Remark Because the IDE uses GDB to do its debugging, it is necessary to enter all expressions in uppercase in FreeBSD.

A list of watches and their present value is available in the watches window, which can be opened with the ”Debug—Watches” menu. The watch list window is shown in figure (6.14).



Figure 6.14: The watch list window.

PIC


Pressing Enter or the space bar will show the watch property dialog for the currently highlighted watch in the watches window.

The list of watches is updated whenever the IDE resumes control when debugging a program.