Skip to content
CAI
Software that uses CAICheck a score

deivid-rodriguez/byebug

66.3

Adequate · 28 September 2026

5.4k

lines of production code

Ruby

with C

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Byebug is a Ruby debugger that provides interactive, script-based, and post-mortem debugging capabilities for local processes. It supports multi-threaded applications through granular thread control and offers detailed inspection of variables, breakpoints, and program state via a structured command interface. The system relies on a modernized C extension for tracepoint handling and uses Reline for input, while explicitly excluding remote debugging and legacy line-caching features.

How it got here

2013 — Byebug 13.0.0 major refactoring

13 changes.

This period focused on a major internal refactoring to support Ruby 3.4 and modernize the codebase, including updating the C extension to use Ruby 3.0+ APIs and restructuring commands into a new class-based API. Legacy features such as remote debugging and the linecache19 dependency were removed, alongside obsolete documentation and test examples. The project also standardized development tooling via Bundler binstubs and overhauled dependencies to require Ruby 3.3+.

2014–2015 — Architecture refactoring and feature expansion

12 changes.

Byebug underwent a significant internal restructuring, replacing monolithic code with modular components for command processing, settings, and output printing. This architectural overhaul was accompanied by the introduction of granular debugging features, including multi-thread management, detailed variable inspection, and enhanced breakpoint control. Comprehensive test suites were added to ensure the stability of these new interfaces and internal helpers.

2017–2025 — Build infrastructure and code refactoring

7 changes.

This period focused on modernizing the project's development environment by introducing Docker-based builds and modularizing the Rake task system for better maintainability. Significant refactoring efforts were applied to the remote debugging subsystem and entry points, while dependency management was standardized through local Bundler configurations.

Features

Add breakpoints and display subcommands to the enable command

The enable command now supports two new subcommands: 'breakpoints' (or 'b') and 'display' (or 'd'). Users can now enable specific breakpoints by providing their IDs, or enable all breakpoints if no IDs are given. Similarly, users can enable specific display expressions by providing their code numbers, or enable all displays if no arguments are provided. Both subcommands are allowed in post-mortem mode.

lib/byebug/commands/enable · high confidence

Introduce Docker-based build and test environment for byebug

Added a new Dockerfile and Ruby-based manager script to build and test byebug within isolated Alpine Linux containers. The Dockerfile compiles Ruby from source using specified download URLs and SHA256 checksums, installs build dependencies, and includes Shellcheck. The manager script automates building, testing, and pushing Docker images for specific Ruby versions (3.3.9, 3.4.9) and compilers (gcc, clang), fetching release metadata from the official Ruby website and handling Docker Hub authentication.

docker · high confidence

Introduce structured printer architecture for Byebug output

Byebug now uses a new printer system located in lib/byebug/printers, starting with a Base class and a Plain text printer. This change replaces ad-hoc output logic with a structured approach that loads message templates from YAML files (base.yml, plain.yml) and supports translation with arguments. The Plain printer handles variable display with width-aware truncation and confirmation prompts, providing a foundation for future output format extensions.

lib/byebug/printers · high confidence

New subcommands for the info command

The info command now supports several new subcommands to provide more detailed debugging context. Users can run 'info breakpoints' (or 'info b') to list the status, location, and hit counts of settable breakpoints, 'info display' (or 'info d') to view auto-display expressions, 'info file' (or 'info f') to see file details like line count, modification time, and SHA1 digest, 'info line' (or 'info l') to show the current source line and file, and 'info program' (or 'info p') to see the program's stop reason (e.g., breakpoint, step). All these subcommands are available in post-mortem mode.

lib/byebug/commands/info · high confidence

New thread management subcommands (current, list, resume, stop, switch)

The \thread\ command now includes five new subcommands that allow users to inspect and control individual threads during debugging. Users can run \thread current\ to view information about the active thread, \thread list\ to see all available threads, and \thread switch \<id\>\ to change the debugging context to a specific thread. Additionally, \thread stop \<id\>\ and \thread resume \<id\>\ enable pausing and resuming execution of specific threads, providing finer-grained control over multi-threaded applications.

lib/byebug/commands/thread · high confidence

Removals

Removal of obsolete documentation and example scripts

The documentation build system and associated assets have been removed, including the Makefile for generating manual pages and Info files, Texinfo source files for the Ruby debugger and Emacs integration, and several Ruby example scripts (such as Hanoi, primes, and triangle calculations). This cleanup eliminates unused build targets and legacy documentation that are no longer part of the project.

doc · high confidence

Removal of rdebug manual page

The manual page for the rdebug command (man/rdebug.1) has been removed from the distribution. Users will no longer have access to the local documentation detailing rdebug's command-line options, such as remote debugging flags and Emacs integration, or its debugging commands like break, step, and continue.

man · high confidence

Removal of remote debugging and legacy linecache dependencies

The library no longer supports remote debugging or the legacy linecache19 gem. The \start\_remote\ method (aliased as \start\_server\) and associated thread/socket infrastructure have been removed, meaning users can no longer connect to a debugger session over TCP. Additionally, the \linecache19\ dependency and its related source-reloading logic (\source\_reload\, \line\_at\) have been stripped out, simplifying the core library and removing features that relied on this older line-caching mechanism.

lib · high confidence

Behavioural changes

Byebug 13.0.0 release with Ruby 3.4 backtrace improvements and MRI 3.2 support drop

This release updates the debugger to support Ruby 3.4, where backtraces now resemble native Ruby backtraces more closely and blocks are correctly shown in stack traces. It also drops official support for MRI 3.2, meaning the gem will no longer install on that platform. Additionally, the \where\ command now accepts an optional numeric argument to print the first N frames, and IDEs can leverage the new line numbers in byebug statements for direct cursor navigation to debug points.

(repo-wide) · high confidence

Byebug 13.0.0: Major internal refactoring and Ruby 3.4 support

Byebug has been refactored to improve maintainability and add support for Ruby 3.4. The internal architecture has been reorganized, introducing new classes such as \Attacher\, \Breakpoint\, \CommandList\, \History\, \OptionSetter\, and \SourceFileFormatter\, while removing legacy files like \helper.rb\ and \processor.rb\. The \Command\ class has been simplified to use a new API, and the \Frame\ class now handles Ruby 3.4-specific method name parsing. The version has been bumped to 13.0.0.

lib/byebug · high confidence

Byebug commands refactored to a new class-based API

The debugger commands in lib/byebug/commands have been completely rewritten to use a new Command and Subcommand API. This change replaces the previous monolithic command files (such as the old break, catch, restart, and thread implementations) with individual, focused classes (e.g., BreakCommand, CatchCommand, ThreadCommand). The refactoring standardizes command registration, improves help text consistency, and introduces subcommand support for complex commands like 'var' and 'thread'.

lib/byebug/commands · high confidence

Byebug internals refactored into modular helper modules

The internal implementation of the debugger has been reorganized from a monolithic structure into distinct, single-responsibility helper modules (BinHelper, EvalHelper, FileHelper, FrameHelper, ParseHelper, PathHelper, ReflectionHelper, StringHelper, ThreadHelper, ToggleHelper, and VarHelper). This refactoring improves code maintainability and clarity without changing the external debugging experience. Key behavioral updates include the removal of the \single\_thread\_eval\ method in favor of \TracePoint.allow\_reentry\ to prevent deadlocks during evaluation, the addition of a cross-platform \which\ command to locate executables, and the introduction of a \var args\ command to inspect function arguments. The \ParseHelper\ now includes a fallback for syntax validation when \RubyVM\ is unavailable, and the \VarHelper\ safely handles the \$SAFE\ global variable by suppressing stderr output during evaluation.

lib/byebug/helpers · high confidence

Configure Bundler to install gems in .bundle directory

A new .bundle/config file has been added to specify that Bundler should install gems into the local .bundle directory (BUNDLE\_PATH: ".bundle"). This ensures consistent dependency placement across environments without requiring global installation or vendor directories.

.bundle · high confidence

Configure local bundle path for lint gems

The lint gemfile setup now installs dependencies into a local .bundle directory instead of the global gem path. This ensures that linting tools are isolated to the project's local environment, preventing conflicts with system-wide gems and making the development setup more reproducible.

gemfiles · high confidence

Introduces new Command and Subcommand API with dedicated processor classes

The debugger's internal command processing has been refactored to use a new Command and Subcommand API. This change introduces a base \CommandProcessor\ class that handles the main REPL loop, auto-commands, and command execution, along with specialized subclasses: \ControlProcessor\ for non-running states, \PostMortemProcessor\ for post-mortem debugging, and \ScriptProcessor\ for executing commands from files. This restructuring allows for more granular control over which commands are available in different debugging modes and provides a cleaner interface for extending processor behavior.

lib/byebug/processors · high confidence

Refactor build and development tasks into modular Rake files

The monolithic Rakefile has been split into distinct, modular task files (compile, docker, docs, lint, release, test) to improve maintainability. This change introduces specific capabilities for each area: Docker operations are now handled via a dedicated \docker\ namespace using a \Docker::Manager\ class; linting is restructured with a \lint\ namespace that installs tools from a separate \gemfiles/lint/Gemfile\ and runs checks like RuboCop, Markdownlint, and shellcheck, while also adding Windows compatibility checks for tools like clang-format; compilation of the byebug extension is extracted to \compile.rake\; and release workflows now integrate with Chandler for gem pushing. Users benefit from clearer task organization, better platform support (Windows), and isolated linting dependencies.

tasks · high confidence

Refactor remote debugging into dedicated Client and Server classes

The remote debugging functionality in lib/byebug/remote has been restructured by extracting the client and server logic into new, separate classes (Client and Server). This change introduces a Server class that supports a \wait\_connection\ option, allowing the server to block until the first client connects, and a Client class that handles the connection loop and command parsing. This refactoring isolates the networking responsibilities, improving code organization and enabling more predictable behavior when waiting for client connections during remote debugging sessions.

lib/byebug/remote · high confidence

Refactored C extension to use Ruby 3.0+ typed data APIs and modern tracepoint handling

The byebug C extension has been updated to use the modern \rb\_data\_type\_t\ (TypedData) API for memory management of \Breakpoint\, \Context\, and \ThreadsTable\ objects, replacing the older \Data\_Wrap\_Struct\ and manual mark/free functions. This change improves garbage collection safety and aligns with Ruby 3.x standards. Additionally, the extension now uses \rb\_tracearg\_from\_tracepoint\ for accessing tracepoint data, which provides more robust and consistent access to event details like file paths, line numbers, and method IDs compared to the previous manual argument parsing. The threading model was also refactored to use a dedicated \ThreadsTable\ class for managing thread contexts, replacing the previous hash-based approach, and the \extconf.rb\ was simplified to use \RbConfig::MAKEFILE\_CONFIG\ for better build flag handling.

ext · high confidence

Refactored debugger interfaces into dedicated classes

The debugger's input/output handling has been reorganized into four distinct interface classes: LocalInterface for standard interactive debugging (now using Reline and handling Ctrl-D as continue), RemoteInterface for network-based debugging (with improved error handling for disconnected clients), ScriptInterface for executing commands from files, and TestInterface for unit testing. This separation clarifies the responsibilities of each debugging mode and improves robustness, particularly in remote scenarios where client disconnection no longer causes crashes.

lib/byebug/interfaces · high confidence

Refactored debugger settings into modular components

The debugger's configuration system has been restructured from a monolithic implementation into individual, modular setting classes (e.g., \AutoirbSetting\, \AutolistSetting\, \HistfileSetting\). This change introduces specific, dedicated settings for controlling automatic IRB/Pry invocation on every stop, customizing the command history file path (defaulting to \.byebug\_history\), and managing the history save file location. Users benefit from more granular control over debugger behavior, such as enabling automatic source listing or adjusting output width, with each setting now clearly defined and isolated within its own module.

lib/byebug/settings · high confidence

Standardize development tool execution via Bundler binstubs

The repository now uses standard Bundler binstubs for key development tools (Rake, Minitest, RuboCop, and Markdown Linter) instead of custom runners or direct gem invocations. This ensures these tools run within the correct isolated environment defined by their respective Gemfiles (e.g., using the lint-specific Gemfile for RuboCop and mdl), providing consistent dependency resolution and simplifying the local development setup.

bin · high confidence

Var command gains subcommands for specific variable scopes

The \var\ command now supports dedicated subcommands to inspect specific variable types: \var all\ displays local, global, and instance variables of \self\; \var args\ shows arguments of the current method or block; \var const \[object\]\ lists constants of a specified module or class (defaulting to \self.class\); \var global\ lists global variables; \var instance \[object\]\ shows instance variables of \self\ or a specific object; and \var local\ lists local variables in the current scope. These subcommands are available in post-mortem debugging mode.

lib/byebug/commands/var · high confidence

exe/byebug: drop relative require

The exe/byebug script now uses a standard require statement instead of a relative path to load byebug/runner, simplifying the entry point and relying on the gem's load path.

exe · medium confidence

Test coverage

Add test suite for changelog, debugger alias, interface, rc, and runner; Added comprehensive test coverage for Byebug command-line interface; Added tests for command and script processors; Added tests for local and script interfaces; Added tests for the BinHelper which method; Added tests for the plain text printer; Refactored test support infrastructure with new helpers and removed legacy files; Removed obsolete test example files.

Dependencies

Major dependency overhaul and Ruby 3.3+ requirement

The project has been updated to require Ruby 3.3.0 or later, dropping support for older versions. The runtime dependency on \columnize\ and \debugger-linecache\ has been removed and replaced with \reline\ (\>= 0.6.0). Development dependencies have been significantly modernized: \pry\ is pinned to 0.16.0, \minitest\ to \~\> 6.0, \irb\ to \~\> 1.15, \yard\ to 0.9.43, and \rake\ to \~\> 13.0. A new linting setup has been introduced in \gemfiles/lint/\ using \rubocop\ (\~\> 1.74), \rubocop-performance\ (\~\> 1.24), \rubocop-packaging\ (from GitHub), and \mdl\ (0.15.0).

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 66 (-1.1)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 75 (-25.4)
  • Maturity 59 → 59 (+0.0)
  • Readiness 67 → 67 (+0.0)
  • Security 67 → 74 (+6.5)

New (2)

  • Inconsistent naming convention for configuration properties vs methods. allow_in_control and allow_in_post_mortem are defined as Properties (likely getters/setters or constants), while always_run is defined as a Method. In Ruby, boolean configuration flags are typically exposed as properties or methods consistently. Having one as a property and another as a method with the same semantic role (checking command constraints) is inconsistent.
  • Projects may be oversized for their cohesion

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

deivid-rodriguez/byebug was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 25476b18d97172fecd61056d36255f311aa4a73c — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-2d9048c36d26.