Skip to content

Instantly share code, notes, and snippets.

@kmdarshan
Created August 28, 2019 14:05
Show Gist options
  • Save kmdarshan/cce1cd56ea8def205afbfe5517b6f8e3 to your computer and use it in GitHub Desktop.
Save kmdarshan/cce1cd56ea8def205afbfe5517b6f8e3 to your computer and use it in GitHub Desktop.
stopping debugger
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment