如何查看变量/常量的实际字符串变量?

时间:2015-02-15 20:32:16

标签: debugging swift parse-platform

环境:在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'时,我得到了正确的解释: enter image description here

但是,当我为指定的变量(常量)执行相同操作时,我得到以下结果:

enter image description here

如何查看变量/常量以显示实际字符串?

1 个答案:

答案 0 :(得分:0)

当程序在调试器中暂停时,您可以通过转到调试器中的estimatedData行找到PFObject字段的值。

debugger