【工作总结】LLDB调试技巧 - 篇一

备忘命令 : 

命令“l”可以查看程序当前运行的位置

(lldb) l
   341         
   342         
   343         
   344         
   345         
   346     }
   347     
   348     
   349     - (void)rightBarButtonAction {
   350         

 

命令“bt”也能查看程序运行的调用栈

(lldb) bt
* thread #1: tid = 0x527b4, 0x000000010db858d7 iSKG`__47-[SKGOAInformationViewController loadFileData:]_block_invoke(.block_descriptor=0x00007f83dc96d5d0, responseObject=2 key/value pairs) + 663 at SKGOAInformationViewController.m:331, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x000000010db858d7 iSKG`__47-[SKGOAInformationViewController loadFileData:]_block_invoke(.block_descriptor=0x00007f83dc96d5d0, responseObject=2 key/value pairs) + 663 at SKGOAInformationViewController.m:331
    frame #1: 0x000000010d948b00 iSKG`__54+[AFNetworkingTool GETwithURL:params:success:failure:]_block_invoke(.block_descriptor=0x00007f83dc96d5a0, task=0x00007f83da4d3370, responseObject=2 key/value pairs) + 112 at AFNetworkingTool.m:24
    frame #2: 0x000000010d9feb21 iSKG`__55-[AFHTTPSessionManager GET:parameters:success:failure:]_block_invoke(.block_descriptor=0x00007f83dc96d500, response=0x00007f83da5c80c0, responseObject=2 key/value pairs, error=0x0000000000000000) + 241 at AFHTTPSessionManager.m:121
    frame #3: 0x000000010d8a39cb iSKG`__72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_272(.block_descriptor=<unavailable>) + 203 at AFURLSessionManager.m:194
    frame #4: 0x0000000112d3fe5d libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #5: 0x0000000112d6049b libdispatch.dylib`_dispatch_client_callout + 8
    frame #6: 0x0000000112d482af libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1738
    frame #7: 0x000000011209a2e9 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #8: 0x000000011205b8a9 CoreFoundation`__CFRunLoopRun + 2073
    frame #9: 0x000000011205ae08 CoreFoundation`CFRunLoopRunSpecific + 488
    frame #10: 0x00000001146fdad2 GraphicsServices`GSEventRunModal + 161
    frame #11: 0x000000010fe0330d UIKit`UIApplicationMain + 171
    frame #12: 0x000000010db8a14f iSKG`main(argc=1, argv=0x00007fff5237e648) + 111 at main.m:17
    frame #13: 0x0000000112d9592d libdyld.dylib`start + 1
    frame #14: 0x0000000112d9592d libdyld.dylib`start + 1

 

检查帧参数和本地变量的最简便的方式“frame variable

(lldb) frame variable
(__block_literal_1 *) .block_descriptor = 0x00007f83dc96d5d0
(__NSCFDictionary *) responseObject = 0x00007f83dc96e390 2 key/value pairs
(SKGOAInformationViewController *) self = 0x00007f83da4cdce0
(__NSCFArray *) shtLists = 0x00007f83dc970910 @"1 object"
(__NSCFDictionary *) aShtDic = 0x00007f83dc9713e0 3 key/value pairs
(SKGOAInformationFileModel *) file = nil

 

转载于:https://www.cnblogs.com/cwllong/p/5228611.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值