Environment: Xcode 11.3.1/Swift 5
Here is the function:
func lldbTest() {
var switchInt = 1
...// do something and set a break point here
if switchInt == 1 {
print("switchInt == 1")
} else if switchInt == 2 {
print("switchInt == 2")
}
}
I debug before enter the if statement, and I change switchInt to 2 in lldb
e switchInt = 2
p switchInt
(Int) $R4 = 2
but it still print "switchInt == 1" result