Class: Debugger::BreakpointsCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::BreakpointsCommand
show all
- Defined in:
- lib/ruby-debug/commands/breakpoints.rb
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
95
96
97
98
99
|
# File 'lib/ruby-debug/commands/breakpoints.rb', line 95
def help(cmd)
%{
b[reak]\tlist breakpoints
}
end
|
.help_command ⇒ Object
91
92
93
|
# File 'lib/ruby-debug/commands/breakpoints.rb', line 91
def help_command
'break'
end
|
Instance Method Details
#execute ⇒ Object
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/ruby-debug/commands/breakpoints.rb', line 74
def execute
unless Debugger.breakpoints.empty?
print "Breakpoints:\n"
Debugger.breakpoints.sort_by{|b| b.id }.each do |b|
if b.expr.nil?
print " %d %s:%s\n", b.id, b.source, b.pos
else
print " %d %s:%s if %s\n", b.id, b.source, b.pos, b.expr
end
end
print "\n"
else
print "No breakpoints\n"
end
end
|
#regexp ⇒ Object
70
71
72
|
# File 'lib/ruby-debug/commands/breakpoints.rb', line 70
def regexp
/^\s*b(?:reak)?$/
end
|