swift defer statement doesn't break point but does print
19:37 16 Dec 2018

I put a defer inside a do, like so

do {
    defer {                     
        self.captureSession?.commitConfiguration()
        print("commitConfiguration")
    }

    self.captureSession?.beginConfiguration() 
    // try a bunch AV session setup calls
    ...
}
catch {
    // error
}

I tried to put a break point to ensure the defer block is stepped into at the end. To my surprise, it didn't. I checked documentation, ran the app, nothing is seemingly wrong. So I put a print statement. Lo and behold, it did print it, showing it probably did execute even though debug breakpoint never got activated.

Anyone observed this in Xcode 10.1 High Sierra ?

swift breakpoints defer-keyword