# debug: 4.5 out of 10

Keep, but not for new work. 7th of 9 in [Logging libraries](https://elestia.ai/opensource/logging/index.md).

debug is a tiny utility that prints namespaced debug messages, switched on with the DEBUG variable. It has no levels, no structured output and no transports, so it is not a full app logger. For library authors it is still the standard way to add opt-in diagnostics. For app logging today, pick Pino or another leveled logger.

**Best for:** Library and tool authors who want opt-in, namespaced diagnostic output that costs nothing when it is off.

## Scores

- **Overall: 4.5** (likely 3.5 to 5.5)
  - Claude Opus 5.5 (4.5): As a logging library for a new app, it misses the category's core needs: levels and structured output. Its maintenance has nearly stopped, and its recent supply-chain incident is a concern. Pino, and for some teams LogTape or winston, does the job better for most people. It remains a fine choice for opt-in diagnostics inside libraries.
  - GPT-6.2 Sol (4.4): debug is worth choosing when selective diagnostics are the main requirement. For a new Node.js application logger, Pino covers severity levels and structured output and has a more active release history. The gap in logging features is clear, while the strength of the recommendation depends on how much the project values opt-in diagnostics.
- **Needed by many: 5.3** (likely 4.3 to 6.9)
  - Claude Opus 5.5 (5.0): Almost every Node project installs debug through its dependencies, but few apps need it as their logger. It does only part of the category's job: namespaced debug output, with no levels or structure. Its main audience is library authors and developers who switch on diagnostics during development.
  - GPT-6.2 Sol (5.6): Opt-in diagnostics are useful across web apps, libraries, and developer tools, and debug supports both Node.js and browsers. Its focus on namespace-filtered messages limits its role in applications that need structured logs. Runtime surveys show how broadly it can run, while demand for this particular workflow is harder to measure.
- **Helps a lot: 4.1** (likely 3.3 to 5.1)
  - Claude Opus 5.5 (4.0): It does its narrow job well. Namespaces, colors, time diffs, printf formatters, and it runs in both Node and browsers. Measured against the category's job, it lacks levels, structured output, transports and redaction, which Pino and winston provide. It also ships no bundled types.
  - GPT-6.2 Sol (4.2): Version 4.4.3 has a small, well-documented API for namespace filters, object inspection, and timing. Its native output is formatted text, so structured records and severity thresholds take extra code. A benchmark run by another logger's author measured low overhead for disabled calls with cheap arguments, though that test covers only one part of the job.
- **Holds up over time: 4.8** (likely 3.6 to 6.4)
  - Claude Opus 5.5 (4.0): The code is mature and stable, and so much depends on it that it will not vanish. Activity is near zero: 3 commits and no releases in the last year, 38 open pull requests, and no published v5 plan. Bluesky posts point to maintainer strain from security-report pressure.
  - GPT-6.2 Sol (5.5): The maintainer describes 4.x as being in stable maintenance and says genuine security issues would still get fixes. Three commits and zero releases in the past year make this a slower-moving choice than Pino. ESLint provides recurring sponsorship, but the project's modest budget and lack of a release roadmap make future maintenance capacity hard to judge.
- **Used widely: 7.1** (likely 5.3 to 8.3)
  - Claude Opus 5.5 (7.0): Its raw numbers are the largest in the category: 3.78B downloads in 4 weeks and 1.4M dependent repos. Most of that is transitive, through Express and similar packages, not a direct choice. Its growth ratio of about 2.3 is below the 4.1 median, so it is losing ground. Direct choices are still in the hundreds of thousands.
  - GPT-6.2 Sol (7.2): ecosyste.ms found about 1.42 million dependent repositories and 46,672 dependent npm packages. Those counts and 11,460 stars suggest broad use, but the 3.78 billion four-week downloads are heavily inflated by indirect installs. Downloads rose 2.26 times year over year, below the 4.1 catalog benchmark and Pino's 5.10, which points to declining relative momentum. The number of new projects choosing debug directly remains uncertain.
- **Vouched for: 6.0** (likely 4.9 to 7.5)
  - Claude Opus 5.5 (5.0): Major projects such as Express, Socket.IO and Mocha have used it for years. That shows trust for diagnostics, but those endorsements are old. Independent guides recommend it only as a development aid beside a real logger. No survey or benchmark backs it as an app logger.
  - GPT-6.2 Sol (6.9): Express 5 and Socket.IO 4 both use debug for their own diagnostics, and ESLint provides recurring financial support. Users also report that the shared DEBUG convention helps when troubleshooting dependencies. These endorsements support the diagnostic use case, while evidence for debug as the main application logger is thin.
- **Safe: 5.1** (likely 3.5 to 6.3)
  - Claude Opus 5.5 (5.0): It is MIT licensed and pulls in one dependency. In September 2025 a phishing takeover of the maintainer's account published debug@4.4.2 with crypto-stealing malware. It was removed within about two hours, but it reached roughly 10% of cloud environments. Old ReDoS issues were fixed. The Scorecard of 2.8 shows no branch protection, no security policy and no SAST.
  - GPT-6.2 Sol (5.2): Version 4.4.3 has an MIT licence and one runtime dependency, and the older denial-of-service advisories affect earlier versions. npm removed the malicious 4.4.2 release the same day it appeared, and the maintainer published 4.4.3 five days later. The maintainer reported adding a hardware security key to the npm account, and npm lists two collaborators. OpenSSF scored the repository 2.8 out of 10, with zeroes for branch protection and security policy and limited visibility into publishing controls.

## Good

- Namespaced loggers turned on with DEBUG=app:* in Node or localStorage.debug in browsers are simple and well understood.
- It has one dependency (ms) and a tiny API that has hardly changed in years, so AI agents write correct code for it.
- It is the de facto convention for diagnostics across the Node ecosystem (Express, Socket.IO, Mocha and many more).

## Bad

- It has no severity levels, no JSON or structured records and no transports, so it cannot be the main logger of a production app.
- Maintenance is very low: 3 commits and no releases in the last year, and 38 pull requests are open.
- The npm package ships no types. TypeScript users need @types/debug.
- debug@4.4.2 was published with crypto-stealing malware after a phishing takeover in September 2025, and the OpenSSF Scorecard is only 2.8.

## The numbers

- Downloads, 4 weeks: 3.8B
- In a year: ×2.3
- GitHub stars: 11k
- Commits, 12 months: 3
- Last npm release: Sept 2025
- Advisories, 24 months: 2
- Licence: MIT
- GitHub: https://github.com/debug-js/debug
- npm: https://www.npmjs.com/package/debug

Many packages install it, so most downloads are not a direct choice.

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
