Elestia Open Source Ratings
4.5

debug

Keep, but not for new work. 7th of 9 logging libraries.

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.

GitHubnpm

Scores

Overall4.5

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 4.5, likely 3.5 to 5.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, likely 3.5 to 5.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 many5.3

How many developers need a tool for this job?

Claude Opus 5.5: 5.0, likely 4.0 to 7.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, likely 4.5 to 6.8

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 lot4.1

How well does it do the job for those who need it?

Claude Opus 5.5: 4.0, likely 3.0 to 5.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, likely 3.6 to 5.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 time4.8

Will it still be a good choice in two years?

Claude Opus 5.5: 4.0, likely 3.0 to 6.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.

  • github commitsLastYear: 3 commits in the last year.
  • github releasesLastYear: No releases since 4.4.3 in Sept 2025.
  • github.com/debug-js/debug/releases: Recent releases are small fixes. No roadmap is visible.
  • bluesky top: Posts about maintainer burnout from security reports.

GPT-6.2 Sol: 5.5, likely 4.2 to 6.8

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 widely7.1

How many use it, and is that growing?

Claude Opus 5.5: 7.0, likely 5.0 to 8.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.

  • npm downloadsLast4Weeks: 3.78B, versus 1.67B a year before, a ratio of about 2.26.
  • medianDownloadsRatio: The median is 4.1, so debug is growing more slowly than the market.
  • dependents.repos: 1.42M repos, mostly transitive.

GPT-6.2 Sol: 7.2, likely 5.6 to 8.5

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.

  • dependents and github.stars: About 1.42 million detected repositories, 46,672 npm packages, and 11,460 stars.
  • npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, project.note, and medianDownloadsRatio: Downloads grew from 1.67 billion to 3.78 billion, with heavy indirect use and growth below the catalog median.
  • peers.Pino.downloadsLast4Weeks and peers.Pino.downloadsSame4WeeksYearAgo: Pino's downloads grew 5.10 times in the same period.
  • bluesky: Sixteen posts, with the most-liked posts mainly about security.
  • github.com/vitejs/vite/pull/21137: Vite switched its diagnostics to obug.
Vouched for6.0

Who stands behind it being good?

Claude Opus 5.5: 5.0, likely 4.0 to 7.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, likely 5.7 to 8.0

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.

Safe5.1

How safe is it to depend on?

Claude Opus 5.5: 5.0, likely 3.0 to 6.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, likely 3.9 to 6.5

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

npm downloads, 4 weeks
3.8B ×2.3 in a year
GitHub stars
11k
Commits, 12 months
3
npm version
4.4.3 Sept 2025
Versions, 12 months
0
Advisories, 24 months
2 of 4 ever
OpenSSF Scorecard
2.8 out of 10, Nov 2026
Licence
MIT

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

Read on 21 November 2026 from GitHub (debug-js/debug), npm (debug), OSV and the OpenSSF Scorecard.

Logging libraries

  1. 8.7Pino
  2. 7.7LogTape
  3. 6.5tslog
  4. 6.3winston
  5. 5.9Consola
  6. 5.4loglevel
  7. 4.5debug
  8. 4.4log4js
  9. 3.4Bunyan
Compare all 9 on six scores