Under the Hood: Building your own Debugger

Last updated: 3 months ago

Xcode's debugger. We use it everyday but how much do we understand how it works, and what if we did the unthinkable and try to build our own? In this session we'll take on the daunting task of understanding how a debugger works and even begin to explore how to build our own.

We'll begin by looking at Xcode and some of the features of its debugger (e.g. breakpoints, reading memory, listing threads). From there we'll explore one by one how these might be implemented, putting together snippets of code at the same time to implement this ourselves. The code will dip deep down into mach related functions so throughout there will be explanation as to how this works and the security implications also.

To wrap up we'll take a look at it all put together, recap, and hopefully instil a message that even though it seemed daunting at first we're able to build even something like a debugger with not too much work and a little bit of reading. Something that will hopefully encourage, you the listener, to explore and play around, even with things that seem super technical at first.