如何为eclipse PHP调试设置正确的URL

时间:2011-11-18 12:02:22

标签: php eclipse url xdebug

我在使用非标准网址在Eclipse中设置PHP调试时遇到了麻烦。

我的应用程序的网址必须是http://xxx/index.php。这是我无法轻易改变的。

我经常无法设置调试配置来调用此URL。这就是我设置的内容:

enter image description here enter image description here

我得到的网址是http://xxxx/xxxx/index.php?这有一个xxxx太多了。我怎么能摆脱这个?

4 个答案:

答案 0 :(得分:1)

在文件字段中,您编写了/xxxx/index.php,将其更改为/index.php

答案 1 :(得分:1)

您可以配置项目特定网址 打开项目属性> PHP调试>默认基本网址

另外,假设您使用的是eclipse-php-3.0.2,请尝试此操作 1.退出日食 2.使用文本编辑器打开工作区/ .metadata / .plugins / org.eclipse.debug.core / .launches / {name} .launch。
3.查找'< booleanAttribute key =" auto_generated_url"值="真" />'
4.替换" true" by" false"并保存。
5.开始日食。

答案 2 :(得分:0)

如果您正在使用xdebug,请尝试在您的eclipse'PHP Xdebug Remote'中进行配置。您需要的路径是本地Web文件的绝对路径(/User/test/Sites/mywebpage.com /)。

答案 3 :(得分:0)

您可以修改org.eclipse.php.server.ui插件以获得您想要的方式。

使用Eclipse的Plugin devlopment透视图来修改插件。

中提供了对话框
  • /org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/PHPWebPageLaunchShortcut.java(在函数contractURL中)
  • /org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerLaunchConfigurationTab.java(in function formatFileName)

Animation showing Java files that need to be modified in the PDT plugin JAR https://vsubhash.wordpress.com/2013/01/26/fix-for-url-auto-generate-bug-in-eclipse-php-pdt-plugin/