Eclipse - 运行/调试快捷键不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13391804/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse - Run/Debug shortcut key doesn't work
提问by Michael Williams
In Eclipse I can only run/debug my project by using one of the menu buttons. Pressing F11or Ctrl+ F11does nothing. I've mapped Debug Last Launched to all kinds of various keyboard shortcuts to see if another program running in the background was intercepting the key presses and that doesn't seem to be the case. Every other keyboard shortcut seems to work fine such as Ctrl+ Shift+ Tor Ctrl+ G.
在 Eclipse 中,我只能使用菜单按钮之一运行/调试我的项目。按F11或Ctrl+F11什么也不做。我已将 Debug Last Launched 映射到各种不同的键盘快捷键,以查看在后台运行的另一个程序是否正在拦截按键操作,但情况似乎并非如此。每隔键盘快捷键似乎正常工作,如Ctrl+ Shift+T或Ctrl+ G。
Any help? The shortcut key works on my other computer and I keep instinctively trying to press it and it's drastically slowing down my work efficiency.
有什么帮助吗?该快捷键在我的另一台计算机上有效,我一直本能地尝试按下它,这大大降低了我的工作效率。
回答by omer.dogan
The only solution works for me ;
唯一的解决方案对我有用;
Open Key mappings (CTRL+SHIFT+Ltwice) Find the debugging shorcuts (F5,F6,F7...) and select
打开 Key mappings ( CTRL+ SHIFT+L两次) 找到调试快捷方式 ( F5, F6, F7...) 并选择
then change the Whenaction value from "Debugging" to "In Window"
然后将Whenaction 值从“ Debugging”更改为“ In Window”
回答by Raz Tourgman
Go to Window -> Preferences -> General -> Keys For each key that doesn't work: Set your binding to whatever you want. - I just copy the command then change "When" from "Debugging" to "Editing Java Source". good luck.
转到 Window -> Preferences -> General -> Keys 对于每个不起作用的键:将绑定设置为您想要的任何内容。- 我只是复制命令,然后将“When”从“Debugging”更改为“Editing Java Source”。祝你好运。
回答by Robin Martin
I battled with a new Dell laptop, so in case it saves someone time ....
我用了一台新的戴尔笔记本电脑,以防万一它节省了一些人的时间......
By default, the F-key priority was set for sound, brightness and music, e.g. F9brings up Windows search. --> This is without pressing the Fnkey and the desired Fkey as expected.
默认情况下,F 键优先级设置为声音、亮度和音乐,例如 F9打开 Windows 搜索。--> 这是没有按Fn预期按下键和所需的Fkey。
To toggle the priority, look for Fn+ Esc. That allows F5, F6etc to work as expected. You can press Fn+ F6for skipping music tracks
要切换优先级,请查找Fn+ Esc。这使得F5,F6等工作按预期。您可以按Fn+F6跳过音乐曲目
回答by Enigma22134
If your computer has a fn lock/toggle that switches between fn and the f1-f12 keys, make sure that you didn't toggle the other mode by accident.
如果您的计算机具有在 fn 和 f1-f12 键之间切换的 fn 锁定/切换键,请确保您没有意外切换其他模式。
回答by schnatterer
If you use the default key mappings, restoring defaults might work.
如果您使用默认键映射,则恢复默认值可能会起作用。
Window
| Preferences
| General
| Keys
(or Ctrl+Shift+Lthen L), then hit Restore Defaults
and OK
.
Window
| Preferences
| General
| Keys
(或Ctrl+ Shift+L然后L),然后击Restore Defaults
和OK
。
For custom mappings, I recommend this answer.
对于自定义映射,我推荐这个答案。
回答by Satish Gadhave
Try F11. It worked for me. Im using Eclipse in ADT.
试试F11。它对我有用。我在 ADT 中使用 Eclipse。
回答by shokri
Please check if another program is trying to hook keyboard messages. Maybe that program prevents the Eclipse to receive some keystrokes including Ctrl+ F11. I had this problem and finally I found out that the problem is about my dictionary application which used Ctrl+ F11to popup. After disabling the hotkey in the dictionary application, Eclipse started to handle Ctrl+ F11correctly!
请检查是否有其他程序试图挂接键盘消息。也许该程序会阻止 Eclipse 接收包括Ctrl+在内的一些击键F11。我遇到了这个问题,最后我发现问题出在我使用Ctrl+F11弹出的字典应用程序上。在字典应用程序中禁用热键后,Eclipse 开始正确处理Ctrl+ F11!
回答by sporak
Edit: My post doesn't directly react the original malfunctioning-F11-behavtheitroad question. But the issue I had seems quite similar and definitely it relates to some other (quite highly voted) answers.
编辑:我的帖子没有直接反应原始的故障-F11-behavtheitroad 问题。但是我遇到的问题似乎非常相似,并且肯定与其他一些(投票率很高)的答案有关。
I've bumped into a similar issue too when I upgraded to Eclipse 4.7 Oxygen and needed to install several plugins from a scratch. F* keys didn't work in the debug perspective even though the appropriate key bindings were configured correctly.
当我升级到 Eclipse 4.7 Oxygen 并且需要从头开始安装几个插件时,我也遇到了类似的问题。即使正确配置了适当的键绑定,F* 键在调试角度也不起作用。
Unfortunately, neither reseting perspective nor reseting key bindings (as suggested in some comments here) helped.
不幸的是,无论是重置视角还是重置键绑定(如这里的一些评论中所建议的)都没有帮助。
The trick that fixed that for me was:
为我解决这个问题的技巧是:
Preferences > Run/Debug > Perspectives > Restore Defaults
首选项 > 运行/调试 > 视角 > 恢复默认值
That revived the F* keys functionality in my debug perspective. I don't thing this is the universal way how to bring the behaviour back, but among the other "Resets to defaults" this one may be the right one in some cases, so it's worth trying.
这在我的调试角度恢复了 F* 键功能。我不认为这是如何恢复行为的通用方式,但在其他“重置为默认值”中,这在某些情况下可能是正确的,因此值得尝试。