环境:在Xcode 6.1中调试Parse返回对象
我可以在对象结构中看到文本,但无法充分查看其指定的变量。
这是代码:
func retrieveAllMediaFromParse() {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), {
let myData:PFQuery = PFQuery(className: kParseMedia)
myData.findObjectsInBackgroundWithBlock{
(objects:[AnyObject]!, error:NSError!)->Void in
if !(error != nil){
// for object in objects {
let myObject = objects[0] as PFObject
let format = myObject.objectForKey("format") as String
let access = myObject.objectForKey("access") as String
let media = myObject.objectForKey("media") as String
let owner = myObject.objectForKey("owner") as String
let text = myObject.objectForKey("text") as String
let thumbNail = myObject.objectForKey("thumbnail") as NSString
}
}
});
}
let text = myObject.objectForKey("text") as String
当我拿出命令字符串的'po'时,我得到了正确的解释:
但是,当我为指定的变量(常量)执行相同操作时,我得到以下结果:
如何查看变量/常量以显示实际字符串?
答案 0 :(得分:0)
当程序在调试器中暂停时,您可以通过转到调试器中的estimatedData
行找到PFObject字段的值。