简体   繁体   English

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

[英]How to set the correct URL for eclipse PHP debugging

I'm having a trouble setting up PHP debugging in Eclipse with a non standard URL. 我在使用非标准URL在Eclipse中设置PHP调试时遇到了麻烦。

The URL for my application must be http://xxx/index.php . 我的应用程序的URL必须是http://xxx/index.php That's something I cannot easily change. 这是我无法轻易改变的。

I'm constantly failing in setting up the debug configuration to call this URL. 我经常无法设置调试配置来调用此URL。 This is what I've set up: 这就是我设置的内容:

在此输入图像描述在此输入图像描述

The URL I'm getting is http://xxxx/xxxx/index.php ?. 我得到的URL是http://xxxx/xxxx/index.php ?。 This has one xxxx too much. 这有一个xxxx太多了。 How can I get rid of this? 我怎么能摆脱这个?

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

You are able to configure project specific url. 您可以配置项目特定的URL。
Open project properties > PHP Debug > Default Base URL 打开项目属性> PHP调试>默认基本URL

Also, assuming you are using eclipse-php-3.0.2, try this. 另外,假设您使用的是eclipse-php-3.0.2,请尝试此操作。
1. Exit eclipse. 1.退出日食。
2. Open workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/{name}.launch with a text editor. 2.使用文本编辑器打开工作区/ .metadata / .plugins / org.eclipse.debug.core / .launches / {name} .launch。
3. Find '<booleanAttribute key="auto_generated_url" value="true"/>' 3.找到'<booleanAttribute key =“auto_generated_url”value =“true”/>'
4. Replace "true" by "false" and save it. 4.将“true”替换为“false”并保存。
5. Start eclipse. 5.开始日食。

You can modify the org.eclipse.php.server.ui plugin to get it the way you want. 您可以修改org.eclipse.php.server.ui插件以获得您想要的方式。

Use the Plugin devlopment perspective of Eclipse to modify the plugin. 使用Eclipse的Plugin devlopment透视图来修改插件。 The dialogs are available in 对话框可用于

  • /org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/PHPWebPageLaunchShortcut.java (in function contractURL) /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) /org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerLaunchConfigurationTab.java(在函数formatFileName中)

动画显示需要在PDT插件JAR中修改的Java文件 https://vsubhash.wordpress.com/2013/01/26/fix-for-url-auto-generate-bug-in-eclipse-php-pdt-plugin/ https://vsubhash.wordpress.com/2013/01/26/fix-for-url-auto-generate-bug-in-eclipse-php-pdt-plugin/

If you are using xdebug, try to configure in your eclipse 'PHP Xdebug Remote'. 如果您正在使用xdebug,请尝试在您的eclipse'PHP Xdebug Remote'中进行配置。 And the path that do you need is the absolute path to your local web files (/User/test/Sites/mywebpage.com/). 您需要的路径是本地Web文件的绝对路径(/User/test/Sites/mywebpage.com/)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM