# sharkdp/dbg-macro

A dbg(…) macro for C++

Repository: https://github.com/sharkdp/dbg-macro
Canonical: https://ross.abutalabs.com/products/dbg-macro
Language: C++
License: MIT
License Family: permissive
Topics: cpp, debugging, macro, pretty-printing
Last push: 2026-02-14T12:28:16+00:00

## Health v2 (maintenance only)
Score: 53/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 67, release rhythm 8, longevity 100
- inputs: {"age_days": 2632, "days_push": 200, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3233, forks 274 (observed 2026-08-28T04:07:50.203499+00:00)

## What it is
A single-header C++ library providing a dbg(…) macro for quick printf-style debugging. It prints file, line, function, expression, value, and type information with colorized, pretty-printed output.

## Use cases
- quickly inspect variable values while debugging C++ code
- print container contents with pretty formatting
- replace printf/cout debugging with richer output
- trace expressions inline without a debugger
- get compiler warnings reminding to remove debug prints

## When to avoid
- you need a full interactive debugger with breakpoints
- you want structured logging for production use

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, logging
- domain: developer-tools
- platform: cpp, cross-platform
- tags: debugging, macro, pretty-printing, header-only, printf-debugging

## Member repositories
- sharkdp/dbg-macro (main) score 53

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:50.203499+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-30T07:24:37.550769+00:00, confidence not recorded.
  - readme: https://github.com/sharkdp/dbg-macro (fetched 2026-08-28T04:07:50.203499+00:00, sha 950b55ee06b0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
