快捷键是F11开始调试。但问题是我必须在该文件上,然后按 F11 开始调试。
例如。
我启动应用程序的文件是“launch.py
”和“example.py
”。example.py
在编辑器中打开,而 launch.py
不是。
现在,如果我按 F11,它将尝试使用“example.py
”启动应用程序并因错误而终止(如预期的那样)。
因此,我必须在编辑器中打开“launch.py
”,然后按 F11 开始调试应用程序。
有没有更简洁的方法来配置调试,以便它以单次点击/键启动应用程序?
编辑:example.py
是其他一些文件(一些模块)。它不会启动应用程序。
最佳答案
如此PyDev Eclipse Tutorial suggests :
After the first run, if you type Ctrl+F11, the last file ran is re-run. Or, if you type just F11, a debug session is started with your last run. Let's test this...
Note: This behavior changed in Eclipse 3.3 -- but it's generally recommended to restore it in the preferences at:
window > preferences > Run/Debug > Launching
and set theLaunch Operation
toAlways launch the previously launched application
.
This tutorial will always consider this as the default option.
那么,您是否选择了此选项?
如果您至少启动过一次
launch.py
,然后您可以轻松地重新启动它。
关于eclipse - 使用 Eclipse 在 PyDev 中调试的快捷方式是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3721444/