PHP not loading xdebug when started from Eclipse PDT

江枫思渺然 提交于 2019-12-10 18:15:50

问题


Hei helping people!

Some while ago I installed xdebug and had some trouble getting it to work — but I did.

Now I tried starting debugging again, but it wouldn't work.

If I call php -m or phpinfo() through the browser, it tells me that xdebug is loaded.

But when I start phpinfo() as phpscript from Eclipse, it doesn't load.

Also adding a line like xdebug_break() it'll tell me

PHP Fatal error: Call to undefined function xdebug_break() in /home/andy/public_html/phpDebugTest/console.php on line 3

I learned that php is called from Eclipse with different include-paths, but I added the same as from php.ini to the project.

Thanks a lot for helping out!


回答1:


This happens because Eclipse PDT copies your php.ini to a temporary folder, without the contents in the relative conf.d folder (such as /etc/php5/cli/conf.d). This results in having your extensions not properly loaded. I answered this question on stackoverflow:5784327, you might check out the solution provided there.



来源:https://stackoverflow.com/questions/5887062/php-not-loading-xdebug-when-started-from-eclipse-pdt

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