Search code examples
iphoneobjective-cxcodedebuggingtweak

How to Debug MobileSubstrate Tweaks?


What is the best way to debug MobileSubstrate extensions, i.e. placing breakpoints etc.? Is there away to do this in Xcode? GNU Debugger?


Solution

  • #define Debugger() { kill( getpid(), SIGINT ) ; }
    

    Then you just call Debugger() wherever you want to place a breakpoint.

    You can also raise an exception if you want to trace the stack:

    [NSException raise:@"Exception Message" format:formatString];