Xcode 8 Beta 4 - Comment Shortcut Disabled
The script mentioned above didn't work right away for me. I had Xcode 8 and 8.1 GM installed and was working with both of them off and on. I ran the script in the terminal, restarted my computer, opened Xcode and it still didn't work. So then I created a new directory in Applications
and moved the GM into that directory. That seemed to fix it.
TL;DR If you have multiple versions of Xcode installed:
- Run in terminal:
sudo /usr/libexec/xpccachectl
- Restart your computer
- Create a new directory in
Applications
- Move the other version into that directory
- Restart Xcode and enjoy!
If Cmd-/
still doesn't work in Xcode 8 on an OS X 10.11 (and apparently on a macOS Sierra - thanks to @DanBlakemore), and sudo /usr/libexec/xpccachectl
and a reboot didn't help, try the following.
- Close Xcode.
- Open
/Applications
in Finder, and renameXcode.app
toXcode2.app
(or any other name). - Rename it back to
Xcode.app
, and relaunch.
It should work now.
The problem seems to be that for whatever reason the system "uninstalls" Xcode extensions at some point, and won't "install" them again. This can be checked by opening Console, and grepping for INSTALL
. If you have INSTALLED
/UNINSTALLED
for com.apple.dt.XcodeBuiltInExtensions
, it won't work if UNINSTALLED
was the last action on it, and will work it if was INSTALLED
.
Figured this out when debugging an Xcode 8 extension.
I fixed it following the steps here: https://twitter.com/kolpanic/status/763323546814844928
In Terminal: sudo /usr/libexec/xpccachectl
Reboot your system.