开发者

How do you watch a variable in xcode 4?

How do you watch a variable in xcode 4? I'm not sure how 开发者_如何学运维to do this.


Right click in the local variables window to see the "Watch Expression" menu command. Type the variable name and the variable will be added.


"Watch VariableName" is available in debug area. Just right click on a var and select "Watch var".

How do you watch a variable in xcode 4?


There is 2 ways to watch a variable and break at certain condition.

  1. Edit breakpoints

Control-click a breakpoint indicator to display a command menu and choose Edit Breakpoint to open the breakpoint editor and set conditions, add actions, and so forth, as mentioned in Breakpoints.

How do you watch a variable in xcode 4?

  1. Use LLDB command line. For example, below command will watch the value of 'I', and break when I==3.

    (lldb) watch set var i Watchpoint created: Watchpoint 1: addr = 0x100001018 size = 4 state = enabled type = w declare @ '/Volumes/data/lldb/svn/ToT/test/functionalities/watchpoint/watchpoint_commands/condition/main.cpp:12' (lldb) watch modify -c 'i==3' (lldb) watch list

This is where you can type LLDB command in Xcode.

How do you watch a variable in xcode 4?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜