C++26 Finally Standardizes the Debugging Breakpoint

C++26: The New Debugging Header

C++26 adds a new <debugging> header with three functions: std::breakpoint(), std::is_debugger_present(), and std::breakpoint_if_debugging(). These replace the platform-specific macros that projects like Boost.Test and Catch2 have long reimplemented. The header is freestanding, and is_debugger_present is replaceable, letting bare-metal platforms provide their own detection.

Sometimes the most useful standard library additions are the simplest ones.

More from this day

2026-10-16