PyDev doesn't execute shortcut to send current line to console

感情迁移 提交于 2019-12-10 04:49:38

问题


According to this question and the PyDev documentation on the interactive console, pressing F2 should send the current line from the PyDev editor to the Python console.

I have a Python file open in the Python editor (I made sure of this by opening it "Open With" --> "Python Editor") and have started a console session by pressing Ctrl+Enter. Nonetheless, when I press F2, nothing happens. I have to select the line I'm interested in and send it to the console with Ctrl+Enter.

I've checked my keybinding options under "Window" --> "Preferences" --> "General" --> "Keys" and am unable to see any differences between the settings for the commands "Execute line in console", which is mapped to F2, and "Interactive Console", which is mapped to Ctrl+Alt+Enter. However, the second command works whereas the first does not. I've also tried mapping the command to other keys, but that hasn't changed the results at all. Any tips on how I can use this command?


回答1:


I had that problem. All shortcuts worked except F2. I tried many things without success. But in the end. Simply restarting Eclipse solved the problem.



来源:https://stackoverflow.com/questions/28646974/pydev-doesnt-execute-shortcut-to-send-current-line-to-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!