i wanted to edit an Bool value while debugging. For this i tried multiple approaches but none of them is working
First, I tried to keep the debug cursor on the variable and right click on the variable and tried to edit value. Although it shows the value had changed to true , the if block is not executed
Another ways i tried are
- expression myvariable = true
- po myvariable = true
- p myvariable = true.
But in all these cases , if i print the variable in xcode lldb debugger, the value shows to be changed, but the execution flow is not changed
var myvariable = some expression
if(variable){
// if block this part doesnt get executed after all these modifications.
}
I am using swift 4.2 and Xcode 10.3. Is there any other way to accomplish this?