Can't comment selection

后端 未结 15 1218
暖寄归人
暖寄归人 2020-12-22 22:19

Sometimes, it seems I can\'t comment my code with the usual shortcut (command + /) under Xcode 8 Beta 4. The option is disabled in the menu (screen

相关标签:
15条回答
  • 2020-12-22 22:44

    Try this. Out of all the other suggestions, this was the only one that worked for me.

    Go to your applications folder and rename Xcode to whatever you want, then open the Xcode. Check to see if the comment selection now works, if so, you can go back and rename Xcode to its default name. If not, rename Xcode back to its original name anyway, and continue searching for another solution.

    This worked perfectly for me.

    0 讨论(0)
  • 2020-12-22 22:44

    For me it was a little bit of CompSci 101:

    Restart your computer

    0 讨论(0)
  • 2020-12-22 22:47

    This bug also happens on Xcode 8.2.1 (8C1002) of macOS 10.12.3 (16D32). And there is another Xcode 7.3, which is fine, also installed on my machine.

    I find two solutions:
    1. Type sudo /usr/libexec/xpccachectl in Terminal, then reboot.
    2. rename the Xcode 8.2.1 to Xcode8,restart Xcode8, now it works!

    0 讨论(0)
  • 2020-12-22 22:48

    Not to downplay the discussion above, but I tried all the solutions proposed above and all failed. Finally I updated Xcode to the latest Version 9.3 (2018) and everything works now!

    0 讨论(0)
  • 2020-12-22 22:50

    None of the workarounds worked for me after installing xcode 8.1 beta. I finally found that moving the Xcode beta out of the applications folder into a different location (desktop is where i put mine) then running sudo usr/libexec/xpccachectl fixed the issues i was having.

    0 讨论(0)
  • 2020-12-22 22:53

    This is a known bug in Xcode 8 beta-4 (according to Apple, on "some systems", without specifying which ones).

    The good news is, according to Apple they've fixed this in beta-5. From the release notes:

    Resolved in Xcode 8 beta 5 – IDE

    The Editor’s Comment/Uncomment Selection command is functional when enabled. (27524523)

    The bad news is, it's still not working for me in beta-5, even after rebooting. And for the life of me, I can't figure out what they mean by "when enabled". Since when do you have to "enable" comment/uncomment, and how would you go about doing that?

    I'm on a Mac Pro cylinder running El Capitan 10.11.6, editing Swift 2.3 code.

    0 讨论(0)
提交回复
热议问题