Xcode命令 - 斜线快捷键注释只有工作有时 [英] Xcode Command-Slash Shortcut to Comment Only Works Sometimes
问题描述
当使用键盘快捷键注释或取消注释命令+ /
时,Xcode的问题非常不可靠。我似乎找不到一个真正的模式,当它破裂,但它通常发生在构建和运行我的代码在模拟器上。它不会再工作,直到我编辑任何我的代码文件中的东西。即使我切换到主视图中的另一个文件,通过快捷方式进行注释也不起作用。其他键盘快捷键,例如缩进命令+ [
]继续正常工作。
I'm having issues with Xcode being quite unreliable when using the keyboard shortcut to comment or uncomment code command+/
. I can't seem to find a real pattern as to when it breaks, but it usually happens after building and running my code on the simulator. It will not work again until I edit something in any one of my code files. Even if I switch to another file in the main view, commenting via shortcut does not work. Other keyboard shortcuts, such as indenting command+[
continue to work just fine.
别人有这个问题,如果是,你找到了解决方案吗?我知道这似乎是一个小投诉,但是当运行,然后快速尝试注释掉一段代码来检查效果,这是一个不便。
Do other people have this issue, and if so, have you found a solution? I know it seems like a small complaint, but when running and then quickly trying to comment out a block of code to check the effect, it's a bit of an inconvenience.
我在OXS Yosemite 10.10(14A389)上使用Xcode 6.1(6A1052d),如果重要的话,在iOS中使用Objective-C。
I am using Xcode 6.1 (6A1052d) on OXS Yosemite 10.10 (14A389) and developing in Objective-C for iOS if that matters.
推荐答案
p>对于Xcode 8,解决方案是
For an Xcode 8, solution is
sudo /usr/libexec/xpccachectl
并重新启动计算机。
这篇关于Xcode命令 - 斜线快捷键注释只有工作有时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!