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?, #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.
112 113 114 115 116 117 118 119 |
# File 'lib/debug/breakpoint.rb', line 112 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
128 129 130 |
# File 'lib/debug/breakpoint.rb', line 128 def enable @tp.enable(target: @iseq) end |
#setup ⇒ Object
121 122 123 124 125 126 |
# File 'lib/debug/breakpoint.rb', line 121 def setup @tp = TracePoint.new(*@events) do |tp| delete if @oneshot suspend end end |