Skip to content

Instantly share code, notes, and snippets.

@krzysztofzablocki
Last active November 24, 2021 19:17
Show Gist options
  • Save krzysztofzablocki/4396302 to your computer and use it in GitHub Desktop.
Save krzysztofzablocki/4396302 to your computer and use it in GitHub Desktop.
Set symbol breakpoint on objc_msgSend then setup this debug command to log all methods called in iOS Simulator. If you want to do device debugging change esp+4 register to r0, esp+8 to r1 Found long ago somewhere on stackoverflow.
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )
@anthonycastelli
Copy link

Saved me ALOT of time. Thanks :)

@smic
Copy link

smic commented Jan 31, 2013

See my fork for the x86_64 platform, https://gist.github.com/4681726

@0xced
Copy link

0xced commented Oct 15, 2015

And if you need more control, Xtrace will let you trace Objective-C calls by class or instance, indented and optionally colored.

@midorikocak
Copy link

how can I limit output to my class methods only?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment