Xcode调试器不打印对象,并且不显示为零 [英] Xcode debugger doesn't print objects and shows nil, when they aren't

查看:414
本文介绍了Xcode调试器不打印对象,并且不显示为零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode在尝试使用 po< objectName> 打印对象时显示错误,但仅适用于一个项目。

Xcode shows an error when trying to print an object with po <objectName>, but only for one project.


错误:无法实现struct:变量< varName>的大小与ValueObject的大小不一致
执行错误,无法PrepareToExecuteJITExpression

error: Couldn't materialize struct: size of variable <varName> disagrees with the ValueObject's size Errored out in Execute, couldn't PrepareToExecuteJITExpression

Xcode调试器还将所有对象显示为 nil self excluded),当它们不是( NSLog 显示正确的输出,在图像中看到)。
我不知道项目有什么问题。每一个其他的项目工作正常。

The Xcode debugger also shows ALL objects as nil (self excluded), when they aren't (NSLog shows correct output, as seen in the image). I don't know what's wrong with the project. Every other project works fine.

任何想法可能是什么? (清洁项目没有任何效果。)

Any idea what it could be? (Cleaning the project had no effect.)

推荐答案

你确定你不在发布模式?

Are you sure you are not in "Release mode"?

如果你想看到变量值,你必须在调试模式(点击你的项目名称左上角的开始/停止按钮附近,然后编辑方案.. ,然后运行设置,然后信息选项卡,然后构建配置。这里设置调试。如果是释放,这是你看到的所有nils)。

If you want to see variable values you have to be in "Debug mode" (click on your project name on the top left corner near start/stop buttons, then "Edit scheme...", then "Run" settings, then "Info" tab, then "Build Configuration". Here set "Debug". If it was on "Release" that's the matter you saw all nils).

这篇关于Xcode调试器不打印对象,并且不显示为零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆