void breakpoint() noexcept;
(since C++26)Unconditional breakpoint: Attempts to temporarily stop program execution and pass control to the debugger, regardless of whether the presence of a debugger can be detected. The behavior of this function is implementation-defined.
[edit] NotesThe intent of this function is allowing for runtime control of breakpoints beyond what might be available from a debugger while not causing the program to exit. For example, breaking when an infrequent non-critical condition is detected, allowing programmatic control with complex runtime sensitive conditions, breaking on user input to inspect context in interactive programs without needing to switch to the debugger application, etc.
This function standardizes many similar existing facilities: __builtin_debugtrap
from LLVM, __debugbreak
from Win32 API, debugger_break
from boost.test, assert(false), _asm { int 3 } (MSVC) and asm("int3") (GCC/clang) for x86 targets, etc.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4