How to set the correct URL for eclipse PHP debugging

时光总嘲笑我的痴心妄想 提交于 2019-12-06 07:16:32

问题


I'm having a trouble setting up PHP debugging in Eclipse with a non standard URL.

The URL for my application must be 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. This is what I've set up:

The URL I'm getting is http://xxxx/xxxx/index.php?. This has one xxxx too much. How can I get rid of this?


回答1:


In the file field, you wrote /xxxx/index.php, change that to /index.php




回答2:


You are able to configure project specific url.
Open project properties > PHP Debug > Default Base URL

Also, assuming you are using eclipse-php-3.0.2, try this.
1. Exit eclipse.
2. Open workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/{name}.launch with a text editor.
3. Find '<booleanAttribute key="auto_generated_url" value="true"/>'
4. Replace "true" by "false" and save it.
5. Start eclipse.




回答3:


If you are using xdebug, try to configure in your 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/).




回答4:


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

  • /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/ServerLaunchConfigurationTab.java (in function formatFileName)

https://vsubhash.wordpress.com/2013/01/26/fix-for-url-auto-generate-bug-in-eclipse-php-pdt-plugin/



来源:https://stackoverflow.com/questions/8182101/how-to-set-the-correct-url-for-eclipse-php-debugging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!