本文介绍了如何在LLDB中调试成员变量(即数组,字典)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在接口中声明了一个全局数组/字典,如下所示.

I've declared a Global Array/ Dictionary in Interface like below.

@interface ViewController ()
{

    NSDictionary *dictionary;

    NSArray *array;

}

我正在进行API调用,并将值存储在这些数组&中;字典.我想在运行时在LLDB中打印数组/字典的内容.

I'm doing API calls and storing values in these array & dictionaries. I'd like to print the contents of the array/dictionary in LLDB during Runtime.

当我尝试打印这些全局变量时,它给了我以下错误.

When i try to print these global variable, it gives me the following error.

(lldb) po assigneeArr
error: warning: Stopped in a context claiming to capture an Objective-C object pointer, but 'self' isn't available; pretending we are in a generic context
error: use of undeclared identifier 'assigneeArr'
error: 1 errors parsing expression

那我怎么调试这个全局声明的变量呢?

So how can i debug this globally declared variable??

推荐答案

通过在以下屏幕中更改 Apple LLVM 7.1语言模块中的 Enable Clang Module Debugging (启用Clang模块调试),最终解决了我的问题射击

Finally resolved my issue by changing Enable Clang Module Debugging in Apple LLVM 7.1 Language Modules as following screen shot

参考文献: https://stackoverflow.com/a/36176158/4014369

这篇关于如何在LLDB中调试成员变量(即数组,字典)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:41