the issue maybe related to XCode settings or somethings that I mistakenly modified. I tried to reset all of settings and the editor can be used again.
Checkout this answer for how to reset the Xcode settings by cmd line: https://stackoverflow.com/a/31719350/22690844