Breakpoint Swift Deinit in Xcode
Setting up the Breakpoint
It's actually very simple to breakpoint the deinit method of a Swift class. Given a class called Test47, the symbolic breakpoint merely looks like this:
And that's about it.
Notes
- If there is no body to your deinit method, the breakpoint will not fire (it gets optimized out or something similar).
- There is no difference in syntax, for the Xcode symbolic breakpoints, between class and instance methods.
- There are no deinit methods for structs, so your SOL on that one.