Skip to content

Instantly share code, notes, and snippets.

@diederikh
Created May 17, 2014 22:36
Show Gist options
  • Save diederikh/c576c2eb13347d302de6 to your computer and use it in GitHub Desktop.
Save diederikh/c576c2eb13347d302de6 to your computer and use it in GitHub Desktop.
Log all Objective-C method calls
2 options:
1. set the environment variable NSObjCMessageLoggingEnabled to YES. This will write a log of all message sends in the folder /tmp/msgSends-xxx.
2. #import <objc/runtime.h>
call (void)instrumentObjcMessageSends(YES); to enable
call (void)instrumentObjcMessageSends(NO); to disable. All output is logged to /tmp/msgSends...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment