123456789_123456789_123456789_123456789_123456789_

Class: DEBUGGER__::ISeqBreakpoint

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Breakpoint
Instance Chain:
Inherits: DEBUGGER__::Breakpoint
Defined in: lib/debug/breakpoint.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Breakpoint - Inherited

Color - Included

#color_pp

See additional method definition at line 50.

#colored_inspect,
#colorize

See additional method definition at line 36.

#colorize_blue,
#colorize_code

See additional method definition at line 79.

#colorize_cyan, #colorize_dim, #colorize_magenta,
#irb_colorize

See additional method definition at line 27.

#with_inspection_error_guard

SkipPathHelper - Included

Constructor Details

.new(iseq, events, oneshot: false) ⇒ ISeqBreakpoint

[ GitHub ]

  
# 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

[ GitHub ]

  
# File 'lib/debug/breakpoint.rb', line 132

def enable
  @tp.enable(target: @iseq)
end

#setup

[ GitHub ]

  
# File 'lib/debug/breakpoint.rb', line 125

def setup
  @tp = TracePoint.new(*@events) do |tp|
    delete if @oneshot
    suspend
  end
end