Pass all arguments of a method into NSLog

后端 未结 2 1916
北恋
北恋 2020-12-09 14:03

I print out something to the console using NSLog(). Is there a way to pass all the current method\'s arguments to NSLog(), or any other function or

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 14:38

    There’s no way to address all arguments in the preprocessor or Objective-C.

    The only way I’m aware of is by use of the debugger. You can add a breakpoint action in Xcode to do this easily. Right click in the leftmost column of a code window, select "Built-in breakpoints" -> "Log breakpoint and arguments and auto-continue".

提交回复
热议问题