Back to Explore

debug-js/debug

GitHub
1 watchersOpen source

Last release: 8 months ago

Debug is a tiny JavaScript debugging utility inspired by Node.js core’s debugging technique. It exposes a `debug(namespace)` function that returns a decorated `console.error`, letting developers toggle debug output by namespace via the `DEBUG` environment variable, and it works in both Node.js and web browsers.

Project status

  • Actively maintained: The upstream last push was 2026-04-01, and there are recent updates through 2025-09-13, indicating ongoing maintenance rather than being abandoned.
  • Update cadence: Changes appear to come on the order of months rather than years, with updates at 2024-12-06 (4.4.0), 2025-05-13 (4.4.1), 2025-09-13 (4.4.3), and an additional upstream push in 2026-04-01 (specific release details after 4.4.3 are not shown in the provided summaries).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 4.4.3

    8 months ago

    Release 4.4.3 is described as functionally identical to 4.4.1, with the main motivation being that version 4.4.2 is compromised. The release notes do not list any code changes beyond that statement.

    Security
  • 4.4.1

    5/13/2025

    Release 4.4.1 ships small behavioral fixes related to how debug namespaces are parsed and how the debug value is loaded in browsers. The code changes match the two release note items, but there is also an undocumented change affecting the node test/coverage setup.

  • 4.4.0

    12/6/2024

    Version 4.4.0 focuses on fixing inefficient regex warnings related to the `.enable()` API. The implementation changes the namespace matching logic to avoid building and testing regular expressions for enable patterns.

    Breaking
  • 4.3.7

    9/6/2024

    Release 4.3.7 primarily upgrades the `ms` dependency. The release notes only mention updating `ms` to 2.1.3, but the actual diff also changes how `ms` is specified (pinned vs range) and removes several README badges.

  • 4.3.6

    7/27/2024

    Release 4.3.6 updates the debug package version and adjusts browser environment detection logic. The documented change replaces usage of the deprecated RegExp.$1 pattern with a safer match-capture variable.

  • 4.3.5

    5/31/2024

    Release 4.3.5 is a small patch release focused on a fix related to debug output depth. The release notes mention a single change, 'Fix/debug depth'.

  • 4.3.4

    3/17/2022

    Release 4.3.4 updates the README with guidance for enabling debug output in Chromium-based browsers. It also replaces a deprecated String.prototype.substr usage in the debug namespace matching logic.

    Features
  • 4.3.3

    11/27/2021

    Release 4.3.3 is described as documentation-only and primarily relates to migrating the repository from the old GitHub org (visionmedia/debug) to debug-js/debug. The code diff confirms changes are limited to project metadata, README content, LICENSE/copyright attribution, and a minor JSDoc wording fix, with no substantive runtime logic changes.

  • 4.3.2

    12/9/2020

    Release 4.3.2 is a patch release that improves performance of `.enabled` checks by caching enabled status per logger. The notes only mention the caching behavior at a high level.

  • 4.3.1

    12/9/2020

    Release 4.3.1 is a small patch release that claims to fix a ReDOS regression. The code change replaces a newline-whitespace collapsing RegExp in the object formatter with a split, trim, and join approach.