AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Introduction
This week, we're going to be talking about Debugging in Ruby applications. We'll start by discussing the importance of reading an error message and digging into a problem. This episode will air on March 1st - that's my birthday.
Ruby For All – Episode 32
On this episode of Ruby for All, it’s raining a lot by Julie, chilly outside by Andrew, and Andrew’s birthday is this week! Happy Birthday, Andrew! Since it’s a new month, Andrew and Julie decided to talk about debugging. So today, they’ll be discussing various debugging tools for troubleshooting Rails applications such as binding.irb, binding.pry, puts debugging, the new debug gem, web console, RubyMine, and VS Code debugger. Also, they talk about when to bring in help when a problem has taken too long, and they share advice on the importance of not assuming the cause of the problem, isolating the issue, and taking breaks. Debugging can be difficult and hard to figure out what happened, but always remember, practice makes perfect! We hope you enjoyed this episode! Hit the download button now!
[00:01:23] Andrew is ready to go and asks Julie what she does when she gets that red Rails error screen, and he tells us he reads in chunks.
[00:02:11] What debugging tools does Julie use? She explains using binding.irb or binding.pry. Andrew tells us he uses pry a lot, and some others are puts debugging, a new debug gem that’s in Ruby 3, and Web Console.
[00:06:15] We hear about the debugger, RubyMine and the new debug gem that Andrew likes. He tells us he’s huge binding.pry user since it comes naturally to him, and there’s a video by Justin Searls you should check out.
[00:07:37] Has Julie ever run into a bug that fixes itself when you restart the server? What did Julie do? Andrew brings up the spring gem that he’s used, but it didn’t work the way he wanted it to.
[00:09:12] Julie shares an instance where she worked for hours on a bug, finally give up, walked away, went to bed, came back, and it was fixed.
[00:12:32] Andrew has one more thing to tell us relating to doing puts debugging, and he tells us what he likes to do using ActiveSupport Deprecation.
[00:14:11] Using Sandbox mode is brought up which is a great way if you’re debugging in production, and Andrew tells us one of the hardest parts of debugging is recreating a certain thing and brings up a problem a customer who had with a bug and asked Julie where she would start. Andrew shares a third party service nightmare story with a debugging adventure.
[00:17:48] Julie brings up a great question and wonders at what point do you bring another team member on to help you debug.
[00:21:20] Julie and Andrew discuss using different browsers to figure out things.
[00:24:28] As a junior, Julie doesn’t look at the network tab and the log and wonders if Andrew looks at them. He explains he uses the debugging tools in the browser and the network tab all the time.
Panelists:
Andrew Mason
Julie J.
Sponsors:
Links:
Setup ruby/debug with VSCode by Stan Lo
Debugging Ruby on Rails with Visual Studio Code by Justin Searls
Listen to all your favourite podcasts with AI-powered features
Listen to the best highlights from the podcasts you love and dive into the full episode
Hear something you like? Tap your headphones to save it with AI-generated key takeaways
Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more
Listen to all your favourite podcasts with AI-powered features
Listen to the best highlights from the podcasts you love and dive into the full episode