有没有办法在任何NSLog语句开始时设置断点? [英] Is there a way to set a breakpoint at the start of any NSLog statement?

查看:124
本文介绍了有没有办法在任何NSLog语句开始时设置断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些大的代码库的一部分是打印出奇怪的 NSLog 语句,我试图检测它的来源。有没有办法在每个 NSLog 调用开始时放置1个断点,所以我可以看到它被调用的位置,而不是手动地在所有调用的地方放置断点 NSLog

解决方案

Xcode 6



第1步

在左侧的导航器中, strong>断点导航器(命令⌘ + 7 ):



步骤2

点击左下方的 + 按钮(添加新断点),

然后选择添加符号断点...





步骤3

符号中,键入 NSLog



调试→断点创建中执行相同的操作符号断点



Fo Xcode 5 ,请参阅这个


Some part of a big code base is printing out weird NSLog statements, and I'm trying to detect where it's coming from. Is there a way to put 1 breakpoint at the start of every NSLog call so I can see where it's being called from, rather than manually have to put breakpoints on all places that call NSLog?

解决方案

In Xcode 6:

Step 1:
On the Navigator on the left, go to Breakpoint Navigator (command ⌘ + 7):

Step 2:
Click the + button on the bottom left (Add a new breakpoint),
then choose Add Symbolic Breakpoint...:

Step 3:
In Symbol, type NSLog.

Alternatively, you can do the same thing in DebugBreakpointsCreate Symbolic Breakpoint.

Fo Xcode 5, see this.

这篇关于有没有办法在任何NSLog语句开始时设置断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆