- Ruby / Rails Jobs in Berlin: Backend Software Engineer, Ruby bei Contenful www.contentful.com
Debugging and debuggers in Ruby 3.1
One of first steps in learning a programming language is discovering how to debug that pesky issue in the middle of our program. Why the code execution isn't entering my if statement? What is the value of my_variable? Why Ruby, whyyyy???
Some developers are happy to debug by just puts'ing their way to the solution, others like to poke variables in a REPL or debug frames step by step. All in all, debugging is a means to an end: getting your code to work as you've expected.
In this talk we aim to first clear up some misconceptions about debuggers and understand what is available for us in the Ruby ecosystem. In the Ruby 3.1 release, there are improvements to the "debug" gem with a lot of nice features that might make you reconsider doing step debugging again, in case you aren't already.
As a fellow "throw a pry here and there" debugger, I was impressed to see all this progress happening and hope you'll too!