Debugging Ruby
Just like with any other significant programming language, Ruby has a number of tools to help us analyze, fix, and improve our code. According to a software architect I encountered many years ago, the disparity between a programmer who possesses debugging skills and one who lacks them equates to the distinction between a junior programmer and a senior programmer. By using the right tools to debug our code, we can both improve our code and improve our understanding of how the language is interpreted, which in the long run, is beneficial to our path as developers. Let’s take a look at the tools that come with Ruby out of the box, as well as the gems that the Ruby community has developed to debug our code.
With debugging in mind, in this chapter, we will cover the following topics:
- Debugging functions in Ruby versus PHP
- Gems for debugging
- Understanding Interactive Ruby (IRB)’s usefulness