Debugging NSViewsEdit

When I recently wrote a weblog entry about the difficulty of working with NSView subclasses Gus Mueller of Flying Meat was kind enough to send this link to me.

In short, you can get AppKit to highlight all views in an application, with nested subviews in different colors.

# method 1: set persistent user defaults
defaults write com.wincent.MyAppBundleIdentifier NSShowAllViews YES

# method 2: pass default at launch time
Example.app/Contents/MacOS/Example -NSShowAllViews YES