Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'exit' when debugging in REPL puts pry into a broken state #15

Open
banister opened this issue Aug 10, 2012 · 0 comments
Open

'exit' when debugging in REPL puts pry into a broken state #15

banister opened this issue Aug 10, 2012 · 0 comments

Comments

@banister
Copy link
Collaborator

Note the -1 prompt ([6] (pry) : -1>) which indicates an empty binding_stack

crow:pry-debugger john$ ruby o.rb 

Frame number: 0/1
Frame type: eval

From: o.rb @ line 24 :

    19: def boink
    20:   x = 30
    21:   puts "hi"
    22: end
    23: 
 => 24: binding.pry

[1] (pry) main: 0> break my
Breakpoint 1: o.rb @ line 7 (Enabled) :

     4:   puts "hi"
     5: end
     6: 
 =>  7: def my
     8:   puts "hey there"
     9:   pig
    10: end

[2] (pry) main: 0> my

Breakpoint 1. First hit.
resume_pry: changing binding to #<Binding:0x007fedda447800>

Frame number: 0/1
Frame type: eval

From: o.rb @ line 7 Object#my:

 =>  7: def my
     8:   puts "hey there"
     9:   pig
    10: end

[3] (pry) main: 0> exit
hey there
putty
hi
=> nil
[5] (pry) : -1> cat o.rb
require 'pry'

def love
  puts "hi"
end

def my
  puts "hey there"
  pig
end

def pig
  x = 10
  y = 30
  puts "putty"
  boink
end

def boink
  x = 30
  puts "hi"
end

binding.pry
[6] (pry) : -1> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant