Hmm, when I use pry-byebug to debug my code I use in the following way:
First require the pry-byebug gem in the beginning of the coding
require 'pry-byebug'
def main # Do some coding
puts "Hello"
binding.pry # break point here
puts "World"
end
main
Then when running it my terminal will return enter irb mode and return:
> 3: def main
> 4: puts "Hello"
> 5:
> 6: binding.pry
> => 7: puts "World!"
> 8: end
>
> [1] pry(main)>
So the code indicates where I am right now, and from that point I could check every variable read before the breakpoint (on line 6). The breakpoint indicates the terminal have not yet read things after line 6, so if I had variables there, the terminal would not recognize them.
I could then type next, so binding.pry would jump to the next binding.pry point available or run through the whole code. Or I could simply type continue.
What is very important to remeber is to remove the require 'pry-byebug' and all the breakpoints lines before commiting your code, because we don't want the code to get stuck in those points, right? The user might not know how to deal with it :)
Hope it helped! First time trying to contribute to this awesome community :D