Is there a way to make whitespace visible in the Xcode editor?

In Xcode 7 and later, this command has moved to the Editor menu:

Editor > Show Invisibles

or

Editor > Hide Invisible

Edit

As of Xcode 12.1, the menu item is now simply called Invisibles. It's checked when invisibles are shown, and un-checked when they are not shown.

Further, it looks like Xcode now uses very light blue dots for spaces, and bold light blue dots for the spaces that correspond to your tab positions, which is very nice.


You can also use defaults to read/write to the Xcode plist

This is used/tested in Xcode 6.1

GUI

Editor->Show Invisibles

CLI

Turn it on

defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 1

Turn it off

defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 0

Editor -> Show Invisibles in Xcode 4