Tag Archives: stack trace

Print a stack trace anytime

Here’s how to print a stack trace from code at any point in your app – no need to wait for a crash report! – NSLog(@"%@", [NSThread callStackSymbols]); That requires iOS 4.0+. There are some easy-to-use C functions that do the same thing: #import <execinfo.h> #import <unistd.h> void PrintStackTrace() {   void *stackAdresses[32];   int […]