Last active
August 24, 2023 17:08
-
-
Save tylermilner/860da640d39b808cba0941546eae2a2d to your computer and use it in GitHub Desktop.
These are Xcode breakpoints I've found to be very useful to have turned on to help debug iOS applications and spot problems early. After creating each one, right-click on it and click "Move Breakpoint To" -> "User" so that the breakpoint will automatically be active for any Xcode project you open.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All Objective-C Exceptions | |
// Catches exceptions thrown by Objective-C code. | |
// Default Xcode breakpoint created by clicking "+" to add breakpoint -> "Exception Breakpoint". | |
// Change "Exception: All" to "Exception: Objective-C". | |
-[UIApplication main] | |
// Helps when printing objects via the debugger by making it aware of the classes in UIKit. | |
// Symbolic breakpoint created by clicking "+" to add breakpoint -> "Symbolic Breakpoint". | |
// Enter "-[UIApplication main]" for the Symbol. | |
// Choose Action -> "Debugger Command". | |
// Enter "expr @import UIKit" for the command. | |
// Check "Automatically continue after evaluating actions". | |
UIViewAlertForUnsatisfiableConstraints | |
// Helps catch undesirable constraints. Usually, these don't cause obvious visual issues, but they should be fixed since we don't know what could happen in future OS versions. | |
// Symbolic breakpoint created by clicking "+" to add breakpoint -> "Symbolic Breakpoint". | |
// Enter "UIViewAlertForUnsatisfiableConstraints" for the Symbol. | |
-[UIView(UIConstraintBasedLayout) _viewHierarchyUnpreparedForConstraint:] | |
// This is another breakpoint that helps to catch undesirable constraints. | |
// Symbolic breakpoint created by clicking "+" to add breakpoint -> "Symbolic Breakpoint". | |
// Enter "-[UIView(UIConstraintBasedLayout) _viewHierarchyUnpreparedForConstraint:]" for the Symbol. | |
UICollectionViewFlowLayoutBreakForInvalidSizes | |
// Helps catch undesirable constraints in UICollectionViews. | |
// Symbolic breakpoint created by clicking "+" to add breakpoint -> "Symbolic Breakpoint". | |
// Enter "UICollectionViewFlowLayoutBreakForInvalidSizes" for the Symbol. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment