Call a macro every time any method is called - Objective C

后端 未结 4 1251
情深已故
情深已故 2020-12-06 07:46

I wrote a debug macro that prints to the console the passed-in string whenever the global kDebug flag == YES.

I need to print out the name

4条回答
  •  情书的邮戳
    2020-12-06 08:36

    Take a look at Dtrace. Instruments provides a GUI interface. You can, say, provide a regex to match all the methods you want to log.

提交回复
热议问题