class Byebug::DeleteBreakpointCommand
Implements byebug “delete” command.
def execute
def execute unless @state.context errmsg "We are not in a state we can delete breakpoints.\n" return end brkpts = @match[1] unless brkpts if confirm("Delete all breakpoints? (y or n) ") Byebug.breakpoints.clear end else brkpts.split(/[ \t]+/).each do |pos| pos = get_int(pos, "Delete", 1) return unless pos unless Byebug.remove_breakpoint(pos) errmsg "No breakpoint number %d\n", pos end end end end
def help(cmd)
def help(cmd) %{ del[ete][ nnn...]\tdelete some or all breakpoints } end
def help_command
def help_command 'delete' end
def regexp
def regexp /^\s *del(?:ete)? (?:\s+(.*))?$/ix end