How to set NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints?
You can configure the setting for a particular scheme as follows ...
1) Select the scheme from the popup menu and choose Edit Scheme ...
2) In the following slide down window add a new entry to Arguments Passed on Launch.
Copy and paste the following line.
-NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints YES
You may also set
Objective C:
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints"];
Swift <3:
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints")
Swift 3-4.2 (at least):
UserDefaults.standard.set(true, forKey: "NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints")
in applicationDidFinishLaunching
.
Note that this will set it for both yourself and your end-users, which may not be what you want (don't go into production like this!). You can set it only for yourself by setting the -NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints YES
argument in your "Debug" run scheme (described in a separate answer).