Skip to content

Instantly share code, notes, and snippets.

View KatekovAnton's full-sized avatar
🎯
Focusing

Katekov Anton KatekovAnton

🎯
Focusing
View GitHub Profile
@KatekovAnton
KatekovAnton / gist:d2c1f959e5d00426a4db76095bc09c2c
Created December 2, 2019 07:21 — forked from lee-dohm/gist:3439284
Detect the debugger using Objective-C on iOS or OS X
#include <assert.h>
#include <stdbool.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/sysctl.h>
static bool AmIBeingDebugged(void)
// Returns true if the current process is being debugged (either
// running under the debugger or has a debugger attached post facto).
{