Xcode调试器报告Swift字典为空(po reports {}) [英] Xcode debugger reporting Swift dictionaries as empty (po reports {})

查看:186
本文介绍了Xcode调试器报告Swift字典为空(po reports {})的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我等到Xcode 6.1.1在这行之后点击一个断点

When I wait until Xcode 6.1.1 hits a breakpoint after this line

let metrics = ["leading" : 15.0, "size" : 44.0]

然后键入 po指标调试器报告(延迟几秒钟) {} ,这似乎是错误的。 po metrics.count 报告 2 ,这是正确的。

and then type po metrics the debugger reports (after several seconds delay) {}, which seems wrong. po metrics.count reports 2, which is right.

这是一个功能还是一个错误?

Is this a feature or a bug?

更新在物理设备(iPhone 5)上调试时出现问题,例如

UPDATE The problem appears when debugging on a physical device (iPhone 5), e.g. not on a simulator (e.g. iPhone 6 Plus).

推荐答案

您是否尝试这样做?

let metrics:NSDictionary? = ["leading" : 15.0, "size" : 44.0]

println(metrics!)

这篇关于Xcode调试器报告Swift字典为空(po reports {})的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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