class DEBUGGER__::CheckBreakpoint

Public Class Methods

new(expr, path) click to toggle source
Calls superclass method DEBUGGER__::Breakpoint::new
# File debug-1.4.0/lib/debug/breakpoint.rb, line 317
def initialize expr, path
  @expr = expr.freeze
  @key = [:check, @expr].freeze
  @path = path

  super()
end

Public Instance Methods

setup() click to toggle source
# File debug-1.4.0/lib/debug/breakpoint.rb, line 325
def setup
  @tp = TracePoint.new(:line){|tp|
    next if tp.path.start_with? __dir__
    next if tp.path.start_with? '<internal:'
    next if ThreadClient.current.management?
    next if skip_path?(tp.path)

    if safe_eval tp.binding, @expr
      suspend
    end
  }
end
to_s() click to toggle source
# File debug-1.4.0/lib/debug/breakpoint.rb, line 338
def to_s
  "#{generate_label("Check")} #{@expr}"
end