5.1.1 Setting Breakpoints
You can set breakpoints by location or by name.
18.104.22.168 Setting Breakpoints by Location
Breakpoints are set at a specific location in the program.
If the source line is visible, click with _mouse button 1_ on the
left of the source line and then on the `Break' button.
As a faster alternative, you can simply press _mouse button 3_ on
the left of the source line and select the `Set Breakpoint' item from
the line popup menu.
As an even faster alternative, you can simply double-click on the
left of the source line to set a breakpoint.
As yet another alternative, you can select `Source => Breakpoints'.
Click on the `Break' button and enter the location.
(If you find this number of alternatives confusing, be aware that
DDD users fall into three categories, which must all be supported.
_Novice users_ explore DDD and may prefer to use one single mouse
button. _Advanced users_ know how to use shortcuts and prefer popup
menus. _Experienced users_ prefer the command line interface.)
Breakpoints are indicated by a plain stop sign, or as `#N', where N
is the breakpoint number. A greyed out stop sign (or `_N_') indicates
a disabled breakpoint. A stop sign with a question mark (or `?N?')
indicates a conditional breakpoint or a breakpoint with an ignore count
If you set a breakpoint by mistake, use `Edit => Undo' to delete it
22.214.171.124 Setting Breakpoints by Name
If the function name is visible, click with _mouse button 1_ on the
function name. The function name is then copied to the argument field.
Click on the `Break' button to set a breakpoint there.
As a shorter alternative, you can simply press _mouse button 3_ on
the function name and select the `Break at' item from the popup menu.
As yet another alternative, you can click on `Break...' from the
Breakpoint editor (invoked through `Source => Breakpoints') and enter
the function name.
126.96.36.199 Setting Regexp Breakpoints
Using GDB, you can also set a breakpoint on all functions that match a
given string. `Break => Set Breakpoints at Regexp ()' sets a
breakpoint on all functions whose name matches the _regular expression_
given in `()'. Here are some examples:
* To set a breakpoint on every function that starts with `Xm', set
`()' to `^Xm'.
* To set a breakpoint on every member of class `Date', set `()' to
* To set a breakpoint on every function whose name contains `_fun',
set `()' to `_fun'.
* To set a breakpoint on every function that ends in `_test', set
`()' to `_test$'.
automatically generated by info2www version 188.8.131.52