使用Eclipse在PyDev中调试的快捷方式 [英] Whats the shortcut to Debug in PyDev using Eclipse

查看:134
本文介绍了使用Eclipse在PyDev中调试的快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

快捷键为 F11 开始调试。但问题是我必须在该文件上,然后点击F11开始调试。
例如



我的启动应用程序的文件是 launch.py​​ 示例。 py

example.py 在编辑器中打开,而 launch.py​​ 不是。

现在,如果我点击 F11 ,它将尝试使用 example.py ,并由于错误(如预期)而终止。



所以我必须在编辑器中打开 launch.py​​ ,然后点击 F11 开始调试应用程序。

有没有更好的方式配置调试,以便以单击/键启动应用程序?



编辑: example.py 是其他一些文件(某些模块)。它不启动应用程序。

解决方案

由于这个 PyDev Eclipse教程建议


第一次运行后,如果输入 Ctrl + < kbd> F11 ,最后运行的文件被重新运行。或者,如果您只输入 F11 ,则会在上次运行时启动调试会话。我们来测试一下这个...



注意:这个行为在Eclipse 3.3中发生了改变 - 但是通常建议在首选项中恢复它: 窗口>偏好>运行/调试>启动 ,并将 启动操作 设置为 始终启动以前推出的应用程序

本教程将始终将其视为默认选项。




所以,您是否选择了此选项?

如果至少启动了一个 launch.py​​ ,那么您可以轻松重新启动它。 p>

The shortcut key is F11 to start debugging. But issue is that I have to be on that file and then hit F11 to start debugging. Eg.

my file to launch the application is "launch.py" and "example.py".
example.py is open in the editor whereas launch.py is not.
Now, if I hit F11 it will try to launch the application using "example.py" and terminates due to error (as expected).

So then I have to open the "launch.py" in the editor and then hit F11 to start debugging the application.
Is there any neater way to configure the debugging, so that it starts the application in single hit/key?

Edit: example.py is some other file (some module). It does not launch the application.

解决方案

As this 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 the Launch Operation to Always launch the previously launched application.
This tutorial will always consider this as the default option.

So, did you have this option selected?
If you have launch at least once launch.py, then you can re-launch it easily.

这篇关于使用Eclipse在PyDev中调试的快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆