It may desirable to eliminate a breakpoint or watchpoint once it has done its job and you no longer want your script to stop there. This is called deleting the breakpoint. A breakpoint that has been deleted no longer exists; it is forgotten.
With the clear
command you can delete breakpoints according to
where they are in your script. With the delete
command you can
delete individual breakpoints, or watchpoints by specifying their
breakpoint numbers. Note: as described below under the “clear”
command, “d” is an alias for “clear”, not “delete”.
It is not necessary to delete a breakpoint to proceed past it. the BASH debugger automatically ignores breakpoints on the first instruction to be executed when you continue execution.
clear
¶Delete any breakpoints at the next instruction to be executed in the selected stack frame (see Selecting a frame). When the innermost frame is selected, this is a good way to delete a breakpoint where your script just stopped.
It may seem odd that we have an alias “d” for “clear.” It so happens that Perl’s debugger use “d” for its delete command and the delete concept in Perl’s debugger corresponds to “clear” in GDB. (Perl doesn’t have a notion of breakpoint entry numbers). So in order to be compatible with both debugger interfaces, “d” is used as an alias for “clear.” Clear?
clear function
clear filename:function
Delete any breakpoints set at entry to the function function.
clear linenum
d linenum
Delete any breakpoints set at or within the code of the specified line.
delete [breakpoints]
¶Delete the breakpoints, watchpoints specified as arguments.
If no argument is specified, delete all breakpoints (the BASH debugger asks
confirmation, unless you have set confirm off
). You can
abbreviate this command as de
.
Note that for compatibility with Perl’s debugger, d
means
something else: clear
.