当使用 Pydev 插件选择运行或调试时,如何配置 Eclipse 以启动浏览器 [英] How do I configure Eclipse to launch a browser when Run or Debug is selected using Pydev plugin

查看:18
本文介绍了当使用 Pydev 插件选择运行或调试时,如何配置 Eclipse 以启动浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Eclipse Pydev 插件学习 Python 和 Django.当我按下运行或调试时,我希望内部或外部浏览器使用 URL http:/127.0.0.1 启动或刷新.我已经看到它是用 PHP 插件完成的,但不是 Pydev.

I'm learning Python and Django using the Eclipse Pydev plugin. I want the internal or external browser to launch or refresh with the URL http:/127.0.0.1 when I press Run or Debug. I've seen it done with the PHP plugins but not Pydev.

推荐答案

以下是设置外部启动配置以启动 IE 的步骤:

Here are the steps to set up an external launch configuration to launch IE:

  1. 选择运行->外部工具->外部工具配置...
  2. 在左侧窗格中,选择 Program,然后选择新图标(窗格上方最左侧的图标).
  3. 在右侧窗格中,选择选项卡.
  4. 名称: 字段中输入 launch_ie.
  5. Location: 字段中输入 ${system_path:explorer.exe}.
  6. Arguments 字段中输入 http:/127.0.0.1.
  7. 要运行外部配置,请选择运行.
  1. Select Run->External Tools->External Tools Configurations...
  2. In the left hand pane, select Program then the new icon (left-most icon above the pane).
  3. In the right hand pane, select the Main tab.
  4. Enter launch_ie in the Name: field.
  5. Enter ${system_path:explorer.exe} in the Location: field.
  6. Enter http:/127.0.0.1 in the Arguments field.
  7. To run the external configuration, select Run.

如果您想共享配置,您可以使用以下可选步骤:

If you want to share the configuration you can use these optional steps:

  1. 选择常用标签
  2. 另存为部分中选择共享文件:选项.
  3. 选择保存配置的位置(将其保存到其他空项目中可能是个好主意,因为您可以将其导入另一个工作区)

要重新运行配置,您有几个选择:

To rerun the configuration you have a few choices:

  1. 从菜单栏中选择外部工具图标 然后点击 launch_ie
  2. 选择运行->外部工具->启动ie
  3. 按 Alt+R、E、1(假设 launch_ie 是列表中的第一项,否则选择适当的数字)

这篇关于当使用 Pydev 插件选择运行或调试时,如何配置 Eclipse 以启动浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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