Class: DEBUGGER__::ISeqBreakpoint
- Inherits:
-
Breakpoint
- Object
- Breakpoint
- DEBUGGER__::ISeqBreakpoint
- Defined in:
- lib/debug/breakpoint.rb
Instance Attribute Summary
Attributes inherited from Breakpoint
Instance Method Summary collapse
- #enable ⇒ Object
-
#initialize(iseq, events, oneshot: false) ⇒ ISeqBreakpoint
constructor
A new instance of ISeqBreakpoint.
- #setup ⇒ Object
Methods inherited from Breakpoint
#delete, #deleted?, #description, #disable, #duplicable?, #enabled?, #generate_label, #oneshot?, #pending_until_load?, #safe_eval, #skip_path?, #suspend, #to_s
Methods included from Color
#color_pp, #colored_inspect, #colorize, #colorize_blue, #colorize_code, #colorize_cyan, #colorize_dim, #colorize_magenta, #irb_colorize, #with_inspection_error_guard
Methods included from SkipPathHelper
#skip_config_skip_path?, #skip_internal_path?, #skip_location?, #skip_path?
Constructor Details
#initialize(iseq, events, oneshot: false) ⇒ ISeqBreakpoint
Returns a new instance of ISeqBreakpoint.
116 117 118 119 120 121 122 123 |
# File 'lib/debug/breakpoint.rb', line 116 def initialize iseq, events, oneshot: false @events = events @iseq = iseq @oneshot = oneshot @key = [:iseq, @iseq.path, @iseq.first_lineno].freeze super(nil, nil, nil) end |
Instance Method Details
#enable ⇒ Object
132 133 134 |
# File 'lib/debug/breakpoint.rb', line 132 def enable @tp.enable(target: @iseq) end |
#setup ⇒ Object
125 126 127 128 129 130 |
# File 'lib/debug/breakpoint.rb', line 125 def setup @tp = TracePoint.new(*@events) do |tp| delete if @oneshot suspend end end |