# visionmedia/debug

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/visionmedia-debug).**

11,447 stars · 983 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/visionmedia/debug
- awesome-repositories: https://awesome-repositories.com/repository/visionmedia-debug.md

## Description

This project is a namespace-based logging utility for JavaScript runtimes, including Node.js and web browsers. It provides a system for categorizing output into distinct namespaces to enable filtered visibility and color-coded identification of log sources.

The utility allows for dynamic log control, where output streams can be toggled on or off via environment variables or method calls without restarting the application. It includes an execution time profiler that calculates the elapsed time between consecutive log calls to identify performance bottlenecks.

Further capabilities include the ability to redirect log messages to specific output streams, format data using placeholders for objects and strings, and filter output using namespace patterns and wildcards.

## Tags

### Development Tools & Productivity

- [Namespace-Based Log Filtering](https://awesome-repositories.com/f/development-tools-productivity/namespace-based-log-filtering.md) — Ships a system for enabling or disabling specific groups of logs using named namespace identifiers and wildcards.
- [JavaScript and TypeScript Debugging](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/javascript-and-typescript-debugging.md) — Offers specialized debugging and diagnostics for JavaScript and TypeScript code across different runtimes.
- [Namespace-Based Debuggers](https://awesome-repositories.com/f/development-tools-productivity/namespace-based-debuggers.md) — Ships a debugging system using named namespaces to selectively enable or disable logging for specific modules.
- [Browser Console Diagnostics](https://awesome-repositories.com/f/development-tools-productivity/browser-console-diagnostics.md) — Identifies client-side errors through color-coded and formatted logs rendered directly in the browser console.
- [Timestamp Arithmetic](https://awesome-repositories.com/f/development-tools-productivity/duration-formatters/duration-interval-calculators/date-difference-calculators/timestamp-arithmetic.md) — Calculates high-precision time differences between consecutive log calls to measure code execution duration.

### Programming Languages & Runtimes

- [Node.js Logging Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-logging-libraries.md) — Provides a namespace-based logging framework specifically designed for the Node.js runtime environment.

### Software Engineering & Architecture

- [Logging Control Utilities](https://awesome-repositories.com/f/software-engineering-architecture/event-logging/logging-control-utilities.md) — Provides utilities to dynamically toggle specific debug output streams on or off without restarting the application.
- [Execution Time Measurements](https://awesome-repositories.com/f/software-engineering-architecture/execution-time-measurements.md) — Tracks elapsed time of code blocks between log calls to pinpoint performance bottlenecks. ([source](https://github.com/visionmedia/debug#readme))
- [Environment Variable-Based Configuration](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/environment-variable-management/environment-variables/environment-variable-based-configuration.md) — Implements application configuration and log toggling using system environment variables at runtime.
- [Color Mappings](https://awesome-repositories.com/f/software-engineering-architecture/package-based-code-organization/directory-to-package-mappings/namespace-mappings/color-mappings.md) — Assigns consistent visual colors to log sources based on their unique namespace identifiers for easier identification.

### System Administration & Monitoring

- [Execution Time Profilers](https://awesome-repositories.com/f/system-administration-monitoring/execution-time-profilers.md) — Measures time intervals between software events to identify performance bottlenecks and slow functions.
- [Global Debug Output Control](https://awesome-repositories.com/f/system-administration-monitoring/instance-inspection-utilities/global-debug-output-control.md) — Provides global and namespace-specific switches to control the visibility of debugging logs via environment variables. ([source](https://github.com/visionmedia/debug#readme))
- [Log Output Formatting](https://awesome-repositories.com/f/system-administration-monitoring/log-output-formatting.md) — Renders data using placeholders for objects and strings to maintain consistent and readable log layouts. ([source](https://github.com/visionmedia/debug#readme))

### User Interface & Experience

- [Source-Based Color Coding](https://awesome-repositories.com/f/user-interface-experience/color-themes/semantic-color-mappings/code-semantic-colorizers/status-based-color-coding/source-based-color-coding.md) — Assigns unique colors to debug instances based on their namespace to visually distinguish different output sources. ([source](https://github.com/visionmedia/debug#readme))

### Part of an Awesome List

- [Debugging Tools](https://awesome-repositories.com/f/awesome-lists/devtools/debugging-tools.md) — Lightweight debugging utility.
- [Node.js Frameworks and Tools](https://awesome-repositories.com/f/awesome-lists/devtools/node-js-frameworks-and-tools.md) — Logging utility for console and browser.
