Is there a way to Track/trace and log all the methods, by Class and Method name, during a debug session?

Viewed 3540

I am not interested in logging into frameworks or under the covers but only at my source level code upon entry and exit of each method. I would like it to provide Class Name and Method Name and log it to file or at least have it fly by on the screen.

My query is if it is possible with existing Xcode/Debugger/Instruments facilities, can I implement it in an easy way other than an NSLog statement at every method entry and exit, or is there a commercial tool that provides this capability ?

I'm talking source methods here... not execution processes or threads. Thanks.

3 Answers

An alternative which you can use with iOS simulator on the Mac (arm/x86_64)

  1. Create a Symbolic Breakpoint
  2. Symbol: objc_msgSend
  3. Action: Debugger Command
  4. Command:

    p (void)printf("[%s, %s]\n", (char*)object_getClassName($arg1), $arg2)
    

    *p is an alias for expr --

  5. Check: Automatically continue after evaluating actions

Related