An interactive intro to ruby debugger, in the debugger

Update 2024-04-09: Added a second tutorial on using breakpoints.

This is an introduction tutorial to Ruby debugging, inside the ruby debugger itself. The instructions are woven through the code so you’re learning to use the debugger as you’re using the debugger. It’s all very meta.

All you need is a working installation of Ruby 3.3+.

To start the tutorial, first clone my ruby debug tutorial repo:

git clone

And then run the following command in your terminal:

ruby start.rb

Don’t read the source code because it will spoil the fun. :)

Did I just ask you to run a piece of code without inspecting it?? I guess I did. Yes, I know, it’s a lot to ask.

If you don’t trust me (I don’t mind, it’s a wise choice) or just don’t have Ruby 3.3+ installed, you can also use Docker. To do that, instead of running rdbg directly, run:


That script will download a ruby 3.3 official image and run the code inside it. Reading the source of and Dockerfile will not spoil the fun, so please go ahead. :)

This post is licensed under CC BY 4.0 by the author.