C++26, 30년 묵은 디버깅 브레이크포인트를 표준으로 정리하다
C++26: The New Debugging Header
C++26에 <debugging> 헤더가 새로 추가된다. std::breakpoint(), std::is_debugger_present(), std::breakpoint_if_debugging() 세 함수가 전부다. 그동안 Boost.Test, Catch2, Dear ImGui, Unreal 등이 각자 플랫폼별로 구현해온 디버거 감지와 브레이크포인트를 표준 라이브러리로 끌어올린 것이다. is_debugger_present()는 operator new처럼 사용자가 교체할 수 있어 베어메탈에서도 쓸 수 있다.
때로는 가장 유용한 표준 라이브러리 추가가 가장 단순한 것일 때가 있다.