Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ruby debugging


gem 'debugger', group: [:development, :test]


  • Add debugger to anywhere in code that needs a breakpoint.
  • Refresh the page, the rails server terminal will stop, use help.
    • list or l show the line in code
    • pp is pretty print a variable
    • step, next/n, continue
    • irb to ruby shell

Other Tips

  • range =


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.