Parent

Files

Debugger::DeleteBreakpointCommand

Implements debugger “delete” command.

Public Class Methods

help(cmd) click to toggle source
# File cli/ruby-debug/commands/breakpoints.rb, line 150
def help(cmd)
  %{
    del[ete][ nnn...]\tdelete some or all breakpoints
  }
end
help_command() click to toggle source
# File cli/ruby-debug/commands/breakpoints.rb, line 146
def help_command
  'delete'
end

Public Instance Methods

execute() click to toggle source
# File cli/ruby-debug/commands/breakpoints.rb, line 124
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) ")
      Debugger.breakpoints.clear
    end
  else
    brkpts.split(/[ \t]+/).each do |pos|
      pos = get_int(pos, "Delete", 1)
      return unless pos
      unless Debugger.remove_breakpoint(pos)
        errmsg "No breakpoint number %d\n", pos
      end
    end
  end
end
regexp() click to toggle source
# File cli/ruby-debug/commands/breakpoints.rb, line 120
def regexp
  /^\s *del(?:ete)? (?:\s+(.*))?$/x
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.