加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

objective-c – 是否可以在Xcode中创建数据断点?

发布时间:2020-12-15 01:58:07 所属栏目:百科 来源:网络整理
导读:Visual Studio中的数据断点是非常有用的调试工具,我需要像我当前的iPad项目(指针和内存表现奇怪)的东西。 是否可以在Xcode中创建数据断点? 解决方法 这是Xcode中Watchpoint的文档: To monitor changes to the value of variables or data items,you can s
Visual Studio中的数据断点是非常有用的调试工具,我需要像我当前的iPad项目(指针和内存表现奇怪)的东西。

是否可以在Xcode中创建数据断点?

解决方法

这是Xcode中Watchpoint的文档:

To monitor changes to the value of
variables or data items,you can set
watchpoints. A watchpoint pauses
execution of the program whenever the
value of the watched item changes. You
can set a watchpoint on a variable
only when execution of the program is
halted. To set a watchpoint on a
variable:

With execution of the program paused
at a breakpoint,select the variable
in the Variable list in the Debugger
window. See “Debugging in the
Debugger” to learn more about the
Variable list. Choose one of the
following: Run > Variables View >
Watch Variable Watch Variable from the
variable list shortcut menu Xcode
displays a magnifying glass next to
the variable to indicate that the
variable is being watched,as shown in
Figure 7-5. Figure 7-5 Watched
variable in the Variable list

When the value of the variable
changes,Xcode pauses execution of the
program and displays a dialog showing
the location of the program counter
and the new value of the variable. If
execution of the program moves beyond
the scope of the current variable,
Xcode deletes the watchpoint and
pauses execution of the program.

Important: Watching local variables,located on the stack,can cause your program to crash if system calls are made in the current function.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读