How to stop the debugger in a platform agnostic way ?
#ifdef _MSC_VER
// windows OS
# define BREAK_HERE() __debugbreak()
#elif defined(ARCH_X64) || defined(ARCH_X86)
// linux or iOS based systems
# define BREAK_HERE() __asm__("int $3")
#else
# define BREAK_HERE() raise(SIGTRAP)
#endif
Leave a Reply