Xcode Playground 时间轴为空 [英] Xcode Playground Timeline empty
问题描述
我正在尝试在 xcode 7.3.1 版中使用时间线助手编辑器作为操场,它始终为空.
要显示时间线图,您可以使用XCPCaptureValue
:
导入XCPlayground无功x = 0对于我在 0...10 {x += i打印(x)XCPCaptureValue("x 的值", value: x)}
但 XCPCaptureValue
已被弃用,将来将无法使用(没有
右键单击图表,您可以选择显示历史值:
I am trying to use the timeline assistant editor for playground in xcode version 7.3.1, it is always empty. Timeline assistant editor
I think the error is from xcode, however from search it doesn't look like anyone got the same error so i am confused.
To display the result of print
you need to open the "debug area" by going to menu
View > Debug Area > Show Debug Area
or click on the button in the lower left part:
To display the timeline graph, you could use XCPCaptureValue
:
import XCPlayground
var x = 0
for i in 0...10 {
x += i
print(x)
XCPCaptureValue("Value for x", value: x)
}
but XCPCaptureValue
has been deprecated and won't be available in the future (there's no available replacement).
The alternative is to display the graph inline by clicking on the "+" button on the right:
Do a right click on the graphs and you can choose to display value history instead:
这篇关于Xcode Playground 时间轴为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!