Eclipse PDT,如何设置“运行配置”?
Eclipse PDT 非常灵活,但这是我的问题,回复:启动器(运行配置)
我试图在我的本地计算机(带有 WAMP 堆栈)上保持一切非常干净、简洁,并且我配置了许多虚拟主机,我的网址很容易使用。
在 eclipse 中,我设置了 PHP 服务器来与这些 Vhost 相对应。
由于我有现有代码,因此我通常“从现有源”设置一个新项目。
然后,当我尝试“运行”时,我会像这样自动生成 URL;其中包含项目名称: http://MyVhost/MyProj/testing.php
我真正想要的是: http://MyVhost/testing.php
我发现自己对服务器和运行配置进行了大量编辑和调整,然后我才能获得有效的 URL。有什么建议吗?
Eclipse PDT is very slick, but here's my issue, Re: Launcher (run configurations)
I'm trying to keep things very clean, concise on my local machine (with WAMP stack) and I have a number of virtual hosts configured, that keep my URL's easy to use.
In eclipse, I set up PHP servers to correspond with these Vhosts.
Since I have existing code, I'm usually setting up a new project 'from existing sources'.
Then when I try to 'run', I get URL auto-generated like this; with the Project name in it:
http://MyVhost/MyProj/testing.php
And what I really want is:
http://MyVhost/testing.php
I find myself doing a lot of editing and adjusting of the servers and run configurations, before I can get the URL that works. Any recommendations ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以创建一个新的运行配置
Run->Run Configurations
,只要您将虚拟热点设置为服务器,您就可以取消选中 URL 下的“自动生成”选项,并为每个配置手动输入 URL项目。因此,即使您指向项目中的不同文件,也没关系,因为 Eclipse 将使用您手动输入的 URL。保存这些,然后就完成了!You can create a new Run Configuration
Run->Run Configurations
and as long as you have setup your virtual hots as servers, you can untick 'Auto Generate' option under URL and enter you URL manually for each project. So even if you point to different files in your project, it won't matter because Eclipse will use your manually entered URL. Save these and then you're done!自动生成的 URL 的路径部分是基本路径(默认为
/
+ 项目名称)+ 项目位置内的文件路径。您可以在Project | 中将Base Path 设置为
。它也适用于/
。属性 |调试运行配置
。如果您始终使用站点的文档根目录作为项目位置,它将起作用。The path part of the autogenerated URL is the Base Path (which defaults to
/
+ project name) + the path of the file inside the project location. You can set the Base Path to/
inProject | Properties | Debug
. It applies toRun configurations
as well. If you always use the documentroot of the site as the project location, it will work.我遇到了类似的情况,如果我有一个名为“test”的虚拟主机,我想运行该项目的所有内容...
这是我解决它的三步方法,尽管我不确定除了zend 调试器不工作。
如果您让它自动生成,该项目将附加第二个斜杠和您的项目名称。
希望对某人有帮助。对我帮助很大。
I ran across something similar where if I had a vhost named "test" I wanted to run everything for that project as...
Here is my 3 step how-to to solve it, though I am not sure of any unintended consequences other than zend debugger not working.
The project will append the second slash and your project name if you just let it auto-generate.
Hope that helps someone. Helped me a ton.
您可以修改 org.eclipse.php.server.ui 插件以按照您想要的方式获得它。
使用Eclipse的Plugin devlopment视角来修改插件。这些对话框位于
https://vsubhash.wordpress.com/2013/01/26/fix-for-url-auto-generate-bug-in-eclipse-php-pdt-plugin/
You can modify the org.eclipse.php.server.ui plugin to get it the way you want.
Use the Plugin devlopment perspective of Eclipse to modify the plugin. The dialogs are available in
https://vsubhash.wordpress.com/2013/01/26/fix-for-url-auto-generate-bug-in-eclipse-php-pdt-plugin/