Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created August 4, 2012 01:57
Show Gist options
  • Save jasonLaster/3253484 to your computer and use it in GitHub Desktop.
Save jasonLaster/3253484 to your computer and use it in GitHub Desktop.
create_command 'debug' do
description 'Debug method call.'
banner <<-BANNER
Usage: debug foo(bar)
step inside method invocation.
BANNER
command_options :takes_block => true
def process
binding.pry :input => args.first
target.instance_eval &command_block
s = "_pry_.input = Readline; #{args.join(" ")}"
binding.pry :input => StringIO.new("#{args.join(" ")}")
target.instance_eval
end
end
@jasonLaster
Copy link
Author

def dummy() 
    binding.pry :input => StringIO.new("step");
    hanoi(3, :a, :b, :c)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment