I just tried to create a conditional breakpoint in the XCODE GUI by clicking to add a breakpoint, then editing it and entering an expression in the Condition
field. However, the breakpoint always triggers.
I finally distilled it down to entering true
or false
into the condition field, and even that doesn't work.
Curiously, setting a conditional breakpoint on a line of Objective-C in the same (mixed Swift/Objective-C) project does work.
It looks to me like breakpoint conditions are completely ignored when the breakpoint is in your Swift source code.
Are other developers seeing the same problem? Is there some "secret sauce" to getting Swift breakpoints to work that I am missing?
for i in 1...10
loop and added a breakpoint conditioni == 4
. Can you show a minimal code example and the output of "breakpoint list" in the debugger console? – However, I am using the current Xcode 8.3.1, perhaps this has been fixed. – Beadruby