During my debugging session with Cucumber and adding a new feature to the Automated framework for test Web UI, I had to use Pry to debug the state of my Ruby code due to RubyMine complaining that it could not run a feature file. Since I rarely use Pry and keep forgetting the commands, I am listing them here for reference.

binding.pry
Add this line of code to add a breakpoint in your Ruby code. Something learned today, is this breakpoint gets hit even when you type exit.

exit
Continues the Pry debugging session, this contradicts my expectation for the keyword, as I would expect it to exit and not continue. There is a continue command documented, but it does not look like it exists for the gem version that I am using.

Is there a command to exit completely or am I left with the having to terminate the process?

Categories: Cheatsheet