Ruby debug

What Ruby debug is
Ruby debug is an open-source debugger for Ruby MRI 2.7 and later. Its console lets developers evaluate Ruby expressions, examine program state, control execution, set conditional or exception breakpoints, and enable tracing. It can record a program’s execution and replay it by stepping backward through the log. The `rdbg` command can start Ruby scripts and commands such as Rails, Rake, and RSpec under the debugger, while a console can also attach to a running program over a UNIX domain socket or TCP/IP.
For an interactive console, Ruby debug can use IRB, with autocompletion, multiline input, and commands including `show_source` and `show_doc`. The project describes frontends for VS Code and Chrome DevTools; VS Code use requires the vscode-rdbg extension. Install the gem with `gem install debug` or add `gem "debug", ">= 1.0.0"` to a Gemfile. The project says it has no performance penalty when it is not stepping and no breakpoints are set. The free gem is licensed under BSD-2-Clause. The project describes the debugger as not mature, and warns that remote messages are unencrypted and that `debug/open_nonstop` can expose debugging access without stopping the program.
Who it suits
Ruby MRI developers who need to inspect execution, set breakpoints, trace, or step backward through a recorded run may find Ruby debug useful. It also suits developers who want to launch Ruby scripts or Rails, Rake, and RSpec commands with `rdbg`, or connect a console to a running program.
What it does well
- Evaluates Ruby expressions and inspects program state.
- Supports conditional and exception breakpoints, plus tracing.
- Records execution for backward replay.
- Offers remote attachment over UNIX sockets or TCP/IP.
- Can use IRB features and editor frontends.
What to know first
- The project describes the debugger as not mature.
- Remote debugger messages are not encrypted.
- `debug/open_nonstop` can expose access without pausing the program.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| debug (open-source gem) | Ruby MRI 2.7 and later · BSD-2-Clause license | Free |
As github.com lists them, read 9 Oct 2026. The maker's own page has the final word.
Getting started
- Open https://github.com/ruby/debug.
- Install with `gem install debug` or add `gem "debug", ">= 1.0.0"` to a Gemfile.
- Use `rdbg` to launch a Ruby script or a Rails, Rake, or RSpec command.
- For VS Code, use the vscode-rdbg extension.
Verdict
Choose Ruby debug if you work with Ruby MRI 2.7 or later and want a debugger with breakpoints, remote attachment, and backward replay. Look elsewhere if the project’s stated maturity caveat or its remote-access security warnings do not fit your needs.
Questions
How much does Ruby debug cost?
The open-source gem is free.
Which Ruby versions does it support?
Ruby MRI 2.7 and later.
What platforms are listed?
Linux and self-hosted.
Is Ruby debug open source?
Yes. The repository displays a BSD-2-Clause license.
Can it connect to a running program?
Yes. A console can attach remotely over a UNIX domain socket or TCP/IP. Remote messages are not encrypted.
What editor frontends are described?
The README describes frontends for VS Code and Chrome DevTools. VS Code use requires the vscode-rdbg extension.
Facts from Ruby debug's own pages
- Debugger controls
- Its console can evaluate Ruby expressions, inspect program state, control execution, set breakpoints, and activate tracing. · github.com, 9 Oct 2026
- Editor integrations
- The README describes debugger frontends for VS Code and Chrome DevTools; VS Code use requires the vscode-rdbg extension. · github.com, 9 Oct 2026
- Install
- The README says to install it with `gem install debug` or add `gem "debug", ">= 1.0.0"` to a Gemfile. · github.com, 9 Oct 2026
- IRB console
- It can use IRB as the debug console, adding autocompletion, multiline input, and IRB commands such as `show_source` and `show_doc`. · github.com, 9 Oct 2026
- License and support
- The repository displays a BSD-2-Clause license and invites bug reports and pull requests, while describing the debugger as not mature. · github.com, 9 Oct 2026
- Performance
- The project says it has no performance penalty when not stepping and no breakpoints are set. · github.com, 9 Oct 2026
- Purpose
- The library provides debugging functionality for Ruby (MRI) 2.7 and later. · github.com, 9 Oct 2026
- Recording and replay
- The debugger can record execution and replay it by stepping backward through the execution log. · github.com, 9 Oct 2026
- Remote access risk
- The README warns that `debug/open_nonstop` can create a vulnerability because it opens debugging access without stopping the program. · github.com, 9 Oct 2026
- Remote debugging
- It supports remote debugging over UNIX domain sockets or TCP/IP, with a console that can attach to a running debuggee. · github.com, 9 Oct 2026
- Ruby program use
- The `rdbg` command can launch Ruby scripts or commands such as Rails, Rake, and RSpec under the debugger. · github.com, 9 Oct 2026
- Security limitation
- The README warns that debugger-to-debuggee messages are not encrypted and advises care when using remote debugging. · github.com, 9 Oct 2026
Where Ruby debug stands on Freedom251
- Debuggers#18 of 27