Module: Kernel

Defined in:
lib/trepanning.rb

Instance Method Summary collapse

Instance Method Details

#debugger(opts = {}, &block) ⇒ Object

Same as Trepan.debug. FIXME figure out a way to remove duplication.



303
304
305
306
307
308
309
310
311
# File 'lib/trepanning.rb', line 303

def debugger(opts={}, &block)
  opts = {:hide_stack => false}.merge(opts)
  unless defined?($trepanning) && $trepanning.is_a?(Trepan)
    $trepanning = Trepan.new(opts)
  end
  tf = $trepanning.trace_filter
  tf << self.method(:debugger) unless tf.member? self.method(:debugger)
  $trepanning.debugger(opts)
end