DOKK / manpages / debian 13 / libsdl3-doc / SDL_TriggerBreakpoint.3.en
SDL_TriggerBreakpoint(3) SDL3 FUNCTIONS SDL_TriggerBreakpoint(3)

SDL_TriggerBreakpoint - Attempt to tell an attached debugger to pause.

Defined in SDL3/SDL_assert.h

#include "SDL3/SDL.h"
#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner

This allows an app to programmatically halt ("break") the debugger as if it had hit a breakpoint, allowing the developer to examine program state, etc.

This is a macro--not a function--so that the debugger breaks on the source code line that used SDL_TriggerBreakpoint
and not in some random guts of SDL. SDL_assert
uses this macro for the same reason.

If the program is not running under a debugger,

SDL_TriggerBreakpoint
will likely terminate the app, possibly without warning. If the current platform isn't supported, this macro is left undefined.

It is safe to call this macro from any thread.

This macro is available since SDL 3.2.0.

SDL 3.2.10 Simple Directmedia Layer