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

前端 未结 3 654
面向向阳花
面向向阳花 2020-12-17 20:06

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

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 20:28

    Dave Dribin covers precisely this in his article Tracing Objective-C messages.

    The part you are after is probably this:

    If you set the NSObjCMessageLoggingEnabled environment variable to YES, the Objective-C runtime will log all dispatched Objective-C messages to a file named /tmp/msgSends-.

提交回复
热议问题