# debug-js/debug

A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers

Repository: https://github.com/debug-js/debug
Canonical: https://ross.abutalabs.com/products/debug
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, logging, browser, debug, debugging, node, node-js
Last push: 2026-04-01T12:03:30+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 75, release rhythm 23, longevity 100
- inputs: {"age_days": 5392, "days_push": 154, "days_rel": 354, "gap_med": 122, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11451, forks 987 (observed 2026-08-28T04:10:48.135232+00:00)

## What it is
A tiny JavaScript debugging utility modeled after Node.js core's debugging technique that exposes namespaced debug loggers controlled via the DEBUG environment variable. It works in both Node.js and web browsers, with color-coded output per namespace.

## Use cases
- add toggleable debug logging to a node.js app
- filter debug output by module namespace
- debug javascript code in the browser
- replace console.log with controllable debug statements
- color-code log output per module
- enable verbose logging via environment variable

## When to choose
- you want lightweight, zero-config debug logging in Node.js or the browser
- you need fine-grained control over which modules emit debug output
- you want a battle-tested utility used across the npm ecosystem

## When to avoid
- you need structured logging, log levels, or log shipping to external systems
- you want a full logging framework with file output and rotation
- you need production observability like tracing or metrics

## Facets
- artifact type: library
- maturity: stable
- function: logging, developer-tools
- domain: developer-tools, web-development, backend, frontend
- platform: browser, cross-platform
- tags: debugging, console-output, namespaced-logging, environment-variable, tiny-library, nodejs, javascript

## Member repositories
- debug-js/debug (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:48.135232+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:15:35.351459+00:00, confidence not recorded.
  - readme: https://github.com/debug-js/debug (fetched 2026-08-28T04:10:48.135232+00:00, sha 34415efd32af)
  - registry_npm: https://registry.npmjs.org/debug (fetched 2026-08-29T08:14:36.150499+00:00, sha f6c5b5878b69)
- Data as of 2026-08-30T08:39:29.467469+00:00.
