Xcode 10 skips breakpoints inside a defer block

Originator:intere
Number:rdar://45048050 Date Originated:10/5/2018
Status:Closed (Duplicate) Resolved:No
Product:Xcode Product Version:10
Classification: Reproducible:Yes
 
Summary:
During a debugging session, I noticed that my breakpoints inside of a defer block were never being hit, yet I could clearly see logging from inside those blocks going to the console.  

I created an example reference project to demonstrate this.

Steps to Reproduce:
1. Clone the following project: https://github.com/intere/DebugDeferBlocks
2. Set breakpoints in ViewController.swift at lines 17 and 20
3. Run the project

Expected Results:
Debugger stops at line 20, then after continuing the debugger stops at line 17

Actual Results:
Debugger stops at line 20, then after continuing it never stops again.

Version/Build:
Xcode 10.0 (10A255)
(Running on MacOS Mojave 10.14 (18A391))

Configuration:
Nothing specific

Comments

Closed as duplicate today

From Apple:

Engineering has determined that your bug report (45048050) is a duplicate of 42858960 and will be closed.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!