Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created August 7, 2012 03:23
Show Gist options
  • Save jasonLaster/3281107 to your computer and use it in GitHub Desktop.
Save jasonLaster/3281107 to your computer and use it in GitHub Desktop.
unless Object.const_defined? 'PryDebugger'
$:.unshift File.expand_path '../../lib', __FILE__
$:.unshift File.expand_path '../../../pry/lib', __FILE__
$:.unshift File.expand_path '../../../pry-stack_explorer/lib', __FILE__
require 'pry-debugger'
end
def a()
b
"foo"
end
def b()
c
"foo foo"
end
def c()
d
"foo foo foo"
end
def d()
"foo foo foo foo"
end
binding.pry
a
"fuck bar"
pry-debugger git:(finish) ✗ ruby foo/test5.rb
create a new frame manager
Frame number: 0/1
Frame type: eval
From: foo/test5.rb @ line 28 :
23:
24: def d()
25: "foo foo foo foo"
26: end
27:
=> 28: binding.pry
29: a
30: "fuck bar"
[1] pry(main)> breakpoint b
Breakpoint 1: /Users/quintessentialbum/src/_os/pry-debugger/foo/test5.rb @ line 14 (Enabled) :
11: "foo"
12: end
13:
=> 14: def b()
15: c
16: "foo foo"
17: end
[2] pry(main)> b
Breakpoint 1. First hit.
Frame number: 0/1
Frame type: eval
From: foo/test5.rb @ line 14 Object#b:
=> 14: def b()
15: c
16: "foo foo"
17: end
[3] pry(main)> show-stack
Showing all accessible frames in stack (2 in total):
--
=> #0 [eval] <main>
#1 [top] <main>
[4] pry(main)> nesting
Nesting status:
--
0. main (Pry top level)
[5] pry(main)> l
Frame number: 0/1
Frame type: eval
From: foo/test5.rb @ line 14 Object#b:
=> 14: def b()
15: c
16: "foo foo"
17: end
[6] pry(main)> s
From: foo/test5.rb @ line 14 Object#b:
14: def b()
=> 15: c
16: "foo foo"
17: end
[8] pry(main)> pwd
Nesting status:
--
0. main (Pry top level)
[9] pry(main)> !!!
=> "foo foo"
[11] pry(nil):-1> !!!
➜ pry-debugger git:(finish) ✗ ruby foo/test5.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment