Xcode LLDB观察点 [英] Xcode LLDB watchpoints
问题描述
有没有办法在LODB中使用Xcode观察变量?或者只有GDB才有可能?
我试图使用命令观察点设置变量
,但是我收到了消息:
无效命令'watchpoint set'
iOS支持Watchpoints和从Xcode 4.5开始的Mac OS X调试。要为名为 foo
的变量设置断点,请执行
(lldb )观察点设置变量foo
您可以在lldb控制台中始终使用最短的明确名称命令, / p>
(lldb)wsv foo
在这里也可以工作。
在Xcode中,在本地窗口中,您可以右键单击/控制单击变量,然后您将拥有一个设置观察点的选项。
目前arm和x86 cpus仅支持同时处于活动状态的4个观察点。
Is there any way to watch a variable in Xcode using LLDB ? Or is this only possible with GDB ?
I'm trying to use the command watchpoint set variable
but I get the message:
invalid command 'watchpoint set'
Watchpoints are supported for iOS and Mac OS X debugging as of Xcode 4.5. To set a breakpoint on a variable named foo
, do
(lldb) watchpoint set variable foo
you can always use the shortest unambiguous name for commands in the lldb console so
(lldb) w s v foo
would also work here.
In Xcode, in the locals window you can right-click/control-click on variables and you'll have an option to set a watchpoint on it.
The current arm and x86 cpus only support 4 watchpoints being active at the same time.
这篇关于Xcode LLDB观察点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!