backtracie and the quest for prettier ruby backtraces
A backtrace is one of those Ruby features that is extremely useful, but we never think about it. They’re just always there in our time of need — be it when an error happens, when exploring our code inside a irb or a debugger, or even when profiling our app.
For a while now, I’ve been thinking about, and working on, possible improvements for Ruby’s backtraces — I’ve blogged about it [1, 2], and even ended up creating the backtracie
Ruby gem to be able to make those improvements a reality.
Recently, at FOSDEM 2024, I had a chance to talk about how Ruby backtraces work inside the Ruby VM, as well as how backtracie
works. If you’ve ever been curious about how this mechanism works, this talk is for you.
Slide deck:
Also, during the talk, I mentioned that adding class names to Ruby backtraces was being discussed for integration into Ruby itself and I’m very happy to announce that the feature was recently approved by Matz, the creator of Ruby:
…so look forward to it in Ruby 3.4! It’s really cool to have been part of this effort :)
P.s.: If you’ve not heard before of FOSDEM, I really recommend taking a look. This yearly conference is free (you don’t even need to register), and you get such an amazing amount of talks about every subject in free software. I’ve been attending it yearly, and hope to come back next year as well.