dbg-macro
« Back to VersTracker
Description:
Dbg(…) macro for C++
Type: Formula  |  Latest Version: 0.5.1@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ debugging header-only macro developer-tools
Install: brew install dbg-macro
About:
dbg-macro is a header-only C++ library that provides a dbg(…) macro for easy debugging. It prints the source code location, variable name, and value of any expression to stderr, supporting various types including containers and custom objects. The macro is non-intrusive, requires no setup, and automatically disables itself in release builds.
Key Features:
  • Header-only, no dependencies
  • Pretty-printing for STL containers and custom types
  • Automatic build detection (disabled in NDEBUG)
  • Cross-platform support (C++11 and later)
Use Cases:
  • Quick debugging without a debugger
  • Logging complex data structures during development
  • Educational code demonstrations
Alternatives:
  • Boost.Hana – Heavyweight metaprogramming library with debugging utilities
  • fmt – Formatting library, requires explicit print calls
License: MIT
Bottles available for: all
Version History
Detected Version Rev Change Commit