Homestead 2 xdebug doesn't work

帅比萌擦擦* 提交于 2019-12-05 17:05:38

Posting my own answer here for posterity in the hope it saves someone time as I trawled google for an answer and spent several hours stuck on this.

When doing a sudo netstat -taupen I saw HHVM was listening on port 9000 on the VM which should have been a clue to why it wasn't working, I set hhvm: false in my homestead.yaml to no avail.

After more fiddling I saw that phpinfo() was giving a message of 'HipHop', A quick look at Google again led me to HHVM.

What I didn't do before was reprovision my homestead which sometimes is needed when changing stuff in the config. So after a homestead provision HHVM was fully disabled and xdebug was working.

Also word of warning, editing xdebug settings in the ini requires a restart of php fpm, nginx alone is not enough. Do a sudo service php5-fpm restart.

Just a quick note I tried all of the above provided solutions

My Solution:

for PHP7, Laravel 5.3 and homestead

vagrant ssh

sudo apt-get purge hhvm && sudo service nginx restart

After purging hhvm from the system xDebug works as expected.

Description:

In newer versions of laravel/homestead hhvm is not supported anymore but is still running!

They took all descriptions out of the documentation. (Laravel 5.3)

hhvm: false in the Homestead.yml config does not work anymore!

Tried it in every possible location of the Homestead.yml file, but if you reprovision and boot up homestead the hhvm instance is still running and listening on port 9000...

First I tried to change xDebugs listening port to 9089 which did not work. (yes I restarted fpm)

At some point I got annoyed and purged hhvm from the homestead vm.

Now everything works as expected.

Note: The provisioning is not reinstalling it.

Hope this helps someone and thanks for pointing me into the right direction

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