Pry
Once upon a time, I was a fan of development environments that had big fancy symbolic debuggers that let you set breakpoints and watch variables and step through the code.
What can I say? I was young and programming in Java, a language that had large integrated development environments.
When I started using TDD, I largely stopped using debuggers. Having small, focused tests eliminates most of the need to walk through code in a step debugger. That said, it’s sometimes nice to be able to stop a test in progress and peer inside the Ruby virtual machine to see what’s going on.
Enter Pry.
Pry is technically a Ruby console—a souped-up replacement for irb, but with some add-on gems. It makes an excellent debugger. You can even coax it to reload ...