调试断点 - 在日志消息中显示变量值 [英] Debug Breakpoints - Display variable values in Log Message
本文介绍了调试断点 - 在日志消息中显示变量值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在断点中使用日志消息作为 时,仍然可以将当前变量值打印到日志输出?
When I use the Log Message as Action in a Breakpoint is it still possible to print current variable values to the log output ?
当使用NSLog内联这样的东西是可行的...
When using a NSLog inline something like this is possible ...
NSlog(@"<DeleteArea> <State> CallToggle %i",[[deleteCardState userInfo] intValue]);
然而在断点中使用例如日志消息 ...
however in a breakpoint as Log Message using e.g. ...
@"<DeleteArea> <State> CallToggle %i",[[deleteCardState userInfo] intValue]
不工作。
如何在断点中输出格式化的变量?
How do you output formatted variables in breakpoints?
推荐答案
可以像Debugger Command那样做:
You can do it as a Debugger Command as follows:
expression (void) NSLog(@"<DeleteArea> <State> CallToggle %i",[[deleteCardState userInfo] intValue]);
这篇关于调试断点 - 在日志消息中显示变量值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文