Xcode comment selection shortcut not working on European keyboard

Solution 1:

You can fix this by going to System Preferences > Keyboard > Shortcuts, then App Shortcuts. Click the + button and select Xcode from the top drop bar. Then set the Menu Title to Comment Selection. Next select the keyboard shortcut box and press the desired keyboard combination, then click OK.

It seems that the Norwegian keyboard's encoding of the / character does not work in shortcuts, so you should use something else than the /

enter image description here

Solution 2:

This worked for me

For xcode 8 ->

sudo /usr/libexec/xpccachectl

restart your computer