A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers
Debug is a tiny JavaScript debugging utility modelled after Node.js core's debugging technique, working in both Node.js and web browsers. The project provides a function that accepts a module name and returns a decorated version of console.error, allowing developers to toggle debug output for different parts of their code using the DEBUG environment variable with namespace-based filtering and wildcard support. Built in JavaScript, it features printf-style formatting, colored output based on namespace, millisecond timestamps between calls, and custom formatters, with support for both TTY and non-TTY environments. The project was created by TJ Holowaychuk, Nathan Rajlich, Andrew Rhyne, and Josh Junon.