Track all ObjC method calls?

后端 未结 5 1403
一整个雨季
一整个雨季 2020-11-28 11:31

Sometimes when looking at someone else\'s large Objective-C program, it is hard to know where to begin.

In such situations, I think it would be helpful to log every

5条回答
  •  萌比男神i
    2020-11-28 12:06

    You could add a symbolic breakpoint to objc_msgSend(), and have it log the second parameter without stopping.

    How to do it for your own methods only though is a toucher task. Maybe if you could inspect the class name being called and do some magic to have a conditional breakpoint for only calls where the class' prefix matches your own?

提交回复
热议问题