Xcode 8 beta 4 - Comment/Uncomment broken

Hi,


Xcode 8 beta 4 release notes say:

"On some systems, the Editor’s Comment/Uncomment Selection command is enabled but does nothing. (27524523)"


"Some systems" includes my brand new retina Macbook Pro running El Capitan obviously.


It's hugely inconvenient.


Has anyone figured out a workaround?


Thanks!

Mine was working fine till this morning, but after I changed the Line number and code folding ribbon then it's not working anymore!!! Version 8.1 (8B62)


(It's been fixed after restarting the mac)

Thanks for sharing

Restarting the mac did the tricks after running the xpccachectl command! (Xcode 8.1)

Still broken under xcode 8.2 lol. looks like xcode as less and less bugfix and more feature. I would hope apple would take the time to fix bug before they add features. Some bugs have been here since xcode 6.

I've noticed in xCode Preferences | Key Bindings | All, that there are multiple binings showing up if you search fro CMD+/


One of them was blank after the search so I just replace it with the key sequence cmd+/ and now it works. I had tried the thing from twitter above and it didn't seem to work for me.


Using Xode 8.1 (8B62). Hope it helps somebody if it works...

While working on moderately to large sized C++ projects, I have also noticed that the comment toggle ( ⌘ / ) intermitently stops working, even when all the key bindings are enabled, and the function is not greyed-out in the Editor → Structure → Commnent Selection.


I realized that it only happens for specific source files. If you have multiline /* ... */ comments, it is possible that they overlap, are nested, or not properly closed. This probably confuses the parser that the editor is using. The problem is resolved by deleting the messy, commented-out code. Running a Build Clean also seems to help.


I'm not sure if this is the same problem being discussed here, but I thought I might add my experience.

Thanks Jaques. This is the most concrete explanation I've seen.


In my case having:

//*/

breaks the comment shortcut for all lines below.

Adding a space seems to fix the parsing.

// */


There might be more cases that ***** the parser but at least theres some order to the maddness.

This appears to be still broken at Xcode 8.2.1 (os 10.12.3): sometimes the comment shortcuts stops working and I have to restart XCode.


This is very annoying and doesn't look like something that should take that long too fix -- this should be a P0 for the xcode dev team to fix.

God, Mine too.

Xcode 8.2.1 (8C1002) OSX Captian 10.11.6

Comment/Uncomment is broken. I tried sudo /usr/libexec/xpccachectl,but it doesn't work.

And even I have no nested comment neither blocked comment the menu is still grey. Could anyone help me? It's really a big problem.

This is seriously great, Xcode can't comment code - which is the most used functionality I believe :-)


The same here in not beta / production Xcode.


By the way, the comment out section shortcut works perfectly in the same project on my Xcode 6.2.

This solution worked for XCode Version 8.2.1 (8C1002) not beta under macOS Sierra.


" Try this. I tried the suggested terminal command + restart many times and it didn't work, but this did. Go to your applications folder and rename Xcode to whatever you want, then open the app. Check to see if the comment selection now works, if so, you can go back and rename Xcode to its default name. If not, then keep searching for another method. "


http://stackoverflow.com/a/40604230/2622995

I installed the OS and xcode on a secondary drive, and do not have the problem. However, my main machine has years worth of applications and settings, so I would liek to find a way to get it to work withoput rebuildign from scratch and testing everything. Has anyone found what might be the conflict/real culprit that causes the extensions to unload?

In my code I had this sequence:

/*" BLABLA MY COMMENTS */

All the code under this was not commentable.


I removed the "

and it was OK


Hope it helps!

Still happening for me on:

Version 8.3.2 (8E2002)

Xcode 8 beta 4 - Comment/Uncomment broken
 
 
Q