carb::extras::debuggerBreak
Defined in carb/extras/Debugging.h
-
inline void carb::extras::debuggerBreak(void)
Performs a software breakpoint if a debugger is currently attached to this process.
Remark
This performs a software breakpoint. If a debugger is attached, this will cause the breakpoint to be caught and the debugger will take over the process’ state. If no debugger is attached, this will be ignored. This can be thought of as a more dynamic version of CARB_ASSERT(0) where the existence of a debugger is explicitly checked at runtime instead of at compile time.
Note
This should really only be used for local debugging purposes. The debugger check that is used in here (isDebuggerAttached()) could potentially be expensive on some platforms, so this should only be called when it is well known that a problem that needs immediate debugging attention has already occurred.
- Returns
No return value.