The pry-debugger is very usefull. It has the following commands :
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
However, I dont know how to step into. That is, when a function is called, I want the debugger to open up this function and show me its execution.
How can I do that ?
To invoke the debugger, place binding. pry somewhere in your code. When the Ruby interpreter hits that code, execution stops, and you can type in commands to debug the state of the program.
To start pry, simply type pry after the gem is installed. You can also make it part of your application's dependencies by adding gem "pry" to your application's Gemfile.
There isn't a step back or undo step command listed on this Pry Cheat Sheet. I would suggest ctrl + c (x2), ctrl + d, the get back into your container and hit the binding pry again.
As you said @deivid, step
steps into, while next
steps next. I was mistaken.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With