class Module

Public Instance Methods

debug_method(meth) click to toggle source

Wraps the meth method with Debugger.start {...} block.

# File lib/ruby-debug-base.rb, line 273
  def debug_method(meth)
    old_meth = "__debugee_#{meth}"
    old_meth = "#{$1}_set" if old_meth =~ %r^(.+)=$/
    alias_method old_meth.to_sym, meth
    class_eval "    def #{meth}(*args, &block)
      Debugger.start do
        debugger 2
        #{old_meth}(*args, &block)
      end
    end
"
  end
post_mortem_method(meth) click to toggle source

Wraps the meth method with Debugger.post_mortem {...} block.

# File lib/ruby-debug-base.rb, line 290
  def post_mortem_method(meth)
    old_meth = "__postmortem_#{meth}"
    old_meth = "#{$1}_set" if old_meth =~ %r^(.+)=$/
    alias_method old_meth.to_sym, meth
    class_eval "    def #{meth}(*args, &block)
      Debugger.start do |dbg|
        dbg.post_mortem do
          #{old_meth}(*args, &block)
        end
      end
    end
"
  end