When debugging a Swift 3 program with Xcode 8.0, I am unable to see the current values of variables declared in an enclosing block. Here's a somewhat artificial eaxample that should demonstrate the problem
e.g.
class myclass {
func a(arg: Int) -> Double
{
var sum = 0.0
for i in 0 ..< 100 {
let val = f(i, arg)
sum += somefunc(val)
}
return sum
}
}
When stepping through func a, inside the for Ioop the value of 'sum' is not available
Choosing 'Print Description of "sum"' from the popup menu gives
Printing description of sum:
(Double) sum = <variable not available>
However, the local variable 'val' is available
Am I missing some setting for the debugger in my project? I am pretty sure that this used to work in Xcode 7.x but I can no longer test that.
Regards
Bryan