debug
As of ruby v3.1 debug gem in included. Still, you might want to add the gem if you want to use the latest version.
Insert break points with binding.b
See https://github.com/ruby/debug?tab=readme-ov-file#debug-command-on-the-debug-console for a list of all the debug console commands.