gpt4 book ai didi

objective-c - 没有可用的 Objective-C 描述 - 为什么?

转载 作者:搜寻专家 更新时间:2023-10-30 19:43:57 26 4
gpt4 key购买 nike

我真的不知道为什么在这个特定项目上我的调试器被严重“禁用”。

例如,我想获取某个对象的信息:

(lldb) po [_model dictionaryValue]<br/>
[no Objective-C description available]

我想知道这是为什么。它使调试变得极其困难,并且仅在当前项目中。我猜我在某些时候对设置做了一些事情。它几乎在所有 po someObject 上我试着检查一下。然而,范围内的变量可以在调试控制台左侧的 Pane 中看到。

我在 Xcode 5 上,我的项目中有 Cocoapods,它是一个单元测试目标。

有任何见解或解决此问题的方法吗?

更新:

为清楚起见,部分测试用例是如何实现的:

@interface WWCGateModelTests : XCTestCase  
{
WWCGate *_model;
}
@end

@implementation WWCGateModelTests
- (void)setUp
{
[super setUp];
// Put setup code here; it will be run once, before each test case.

_model = [WWCGate loadGateModelWithIdentifier: kGateName]; // defined, not nil
}

- (void)tearDown
{
[super tearDown];

NSError *error = nil;
[_model saveModelOrError:&error];

// Breakpoint here. po _model does not print the model.
// This has been possible with other projects... po error will print
// nil to the console. How is an ivar not in scope?
}

最佳答案

这很可能发生,因为单元测试目标通常设置为使用“发布”配置运行。 “发布”配置是调试符号已被剥离或优化的配置。

我怀疑如果您确定运行的是未优化的、符号就地调试版本的应用程序,您就不会遇到此问题。您可以在 Xcode 的方案编辑器中更改它(例如,在执行“测试”或“配置文件”时,使用“调试”配置)。

关于objective-c - 没有可用的 Objective-C 描述 - 为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20264619/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com