在开发中,我们经常在控制台输入’p’ 和 ‘po’ 命令,打印对象的值.
殊不知这两个指令只是LLDB调试工具的冰山一角,当我们在控制台’help’的时候,所有的指令都打印在通知台,但我们平时开发需要用到的只有一部分
下面介绍几个常用的指令:
01、设置/取消断点
(lldb) Command + \
02、禁用/启用所有断点
(lldb) Command + Y
03、清空调试框内容
(lldb) Command +
K
04、设置断点
(lldb)
breakpoint set
(lldb) br s -f ViewController.m -l 行号
(lldb) b ViewController.m: 行号
05、查看所有断点
(lldb) breakpoint
list
(lldb) br l
06、删除断点
(lldb)
breakpoint delete 断点编号
(lldb) br del 断点编号
07、单步进入
(lldb) thread
step-
in
(lldb)
step
(lldb) s
F7
08、单步跳过
(lldb)
thread step
-over
(lldb) next
(lldb) n
F6
09、继续执行
(lldb) thread
continue
(lldb)
continue
(lldb) c
10、重新执行
(lldb)
run
11、通过LLDB默认格式打印出返回值
(lldb) p
12、通过用于规定的格式打印出返回值
(lldb) po
13、退出LLDB
(lldb)
exit
(lldb) quit
(lldb) q
转载请注明原文地址: https://ju.6miu.com/read-964592.html