ios 用LLDB查看模擬器文件路徑以及一些經常使用的命令

我看網絡上有好多有關lldb調試命令的介紹,我都看了一遍,都沒有這個方法,因此我在這裏補充出來,幫助須要的人。網絡

另外附上一些spa

實用LLDB命令3d

咱們可使用e命令定義變量

(lldb) e NSString *$str = @"http://www.cnblogs.com/JASON-SONG/"調試

(lldb) po $str
http://www.cnblogs.com/JASON-SONG/
 
 
(lldb) e int $count = 10
(lldb) p $count
(int) $count = 10
(lldb) e NSArray *itemArray = @[@"Test", @"Demo", @"huangyibiao"]
(lldb) po $count
10

命令名 用法 說明對象

 

expr expr 表達式 能夠在調試時動態執行指定表達式,並將結果打印出來,頗有用的命令。
po po 表達式 與expr相似,打印對象,會調用對象description方法。是print-object的簡寫
print print (type) 表達式 也是打印命令,須要指定類型。
bt bt [all] 打印調用堆棧,是thread backtrace的簡寫,加all可打印全部thread的堆棧。
br l br l breakpoint list的簡寫
process continue l process continue 簡寫:c
thread step-in l thread step-in l 簡寫:s
thread step-inst l thread step-inst l 簡寫:si
thread step-over l thread step-over l 簡寫:n
thread step-over-inst l thread step-over-inst l 簡寫:ni
thread step-out l thread step-out l 簡寫:f
thread list thread list 簡寫:th l
相關文章
相關標籤/搜索