Parent

Debugger::DeleteBreakpointCommand

Implements debugger “delete” command.

Public Class Methods

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

Public Instance Methods

execute() click to toggle source
# File lib/ruby-debug/commands/breakpoints.rb, line 120
def execute
  brkpts = @match[1]
  unless brkpts
    if confirm(pr("breakpoints.confirmations.delete_all"))
      Debugger.breakpoints.clear
    end
  else
    brkpts.split(/[ \t]+/).each do |pos|
      pos = get_int(pos, "Delete", 1)
      return unless pos
      if Debugger.remove_breakpoint(pos)
        print pr("breakpoints.delete", id: pos)
      else
        errmsg pr("breakpoints.errors.no_breakpoint", id: pos)
      end
    end
  end
end
regexp() click to toggle source
# File lib/ruby-debug/commands/breakpoints.rb, line 116
def regexp
  /^\s *del(?:ete)? (?:\s+(.*))?$/x
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.