【发布时间】:2015-07-28 11:13:24
【问题描述】:
假设我有一个涉及从数据库中挑选文档的小程序:
let errorDatabase
= NSError(domain: "dk.myproject.couchbase", code: 0, userInfo: nil)
let rev = database.existingDocumentWithID("_design/" + designDocName)
// in xcode I set a break point here
assert(rev != nil)
if rev == nil {
promise.failure(errorDatabase)
}
然后我插入一个断点,运行程序,然后可以这样做:
(lldb) po rev
0x00007fad21df61c0
{
ObjectiveC.NSObject = {...}
}
(lldb) print rev.properties["views"]
(AnyObject?) $R29 = Some {
...
完美的让我们输入repl 并使用rev 对象:
(lldb) repl
6> rev
repl.swift:6:1: error: use of unresolved identifier 'rev'
rev
^
我可能对 swift repl 有错误的期望——我期待某种 python、nodejs 或 scala repl。我可以玩弄物体等的行为。
有什么提示吗?
【问题讨论】: