talira

debug (Ruby)

Ruby's standard debugger, with remote debugging and VS Code and Chrome DevTools frontends

open sourceBSD-2-Clausefree

debug.rb is the debugger for Ruby (MRI) 2.7 and later, replacing the old lib/debug.rb standard library. It has no performance penalty outside stepping and breakpoints, supports remote debugging over a UNIX domain socket or TCP/IP, and works from its console, VS Code (with the vscode-rdbg extension) or Chrome DevTools. It isn't the JavaScript debug logging library.

Problems it solves

  • set breakpoints and step through a Ruby program
  • debug a Ruby app running in a container or on another machine
  • debug Ruby code from VS Code or Chrome DevTools

Features

  • no performance penalty outside stepping mode and breakpoints
  • remote debugging over a UNIX domain socket or TCP/IP
  • frontends: its console, VS Code via vscode-rdbg, and Chrome DevTools
  • rdbg command, -r loading, or binding.break in your code
  • recording and replay debugging
  • break into the debug console with Ctrl-C

Limitations

  • Ruby 2.7 or later only; the debug gem below 1.0.0 is an older, unrelated gem.1

Alternatives

The same job

These do what debug (Ruby) does.

  1. Byebug A simple to use, feature-rich debugger for Ruby
  2. pry-byebug Step-by-step debugging and stack navigation in Pry
  3. js-debug Microsoft's JavaScript debugger for Node.js and browsers, built into VS Code and available as a DAP server
  4. GDB The GNU Project debugger.
  5. Pry A runtime developer console and IRB alternative for Ruby
  6. Debugger for Java Microsoft's Java debugger for VS Code

Compare debug (Ruby) with the top 3