宅基2 xdebug不起作用 [英] Homestead 2 xdebug doesn't work

查看:84
本文介绍了宅基2 xdebug不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Homestead流浪虚拟机设置. Xdebug的所有设置均可用于开箱即用的远程调试.

I have a Homestead vagrant VM setup. Xdebug is all setup for remote debugging out of the box.

我可以在/etc/php5/fpm/conf.d/20-xdebug.ini中看到它 并执行php -i | grep 'xdebug'

I can see this in here /etc/php5/fpm/conf.d/20-xdebug.ini and by doing a php -i | grep 'xdebug'

我已经在默认的index.php中设置了一个断点,并在我的IDE PHPstorm中单击了开始侦听PHP调试连接".

I've setup a breakpoint in my default index.php and clicked the 'start listening for PHP debug connections' in my IDE PHPstorm.

我已经安装了适用于Chrome的xdebug帮助器,并将其打开,并且还在其设置中将我的IDE字符串设置为PHPstorm.

I have installed xdebug helper for chrome and turned it on, also setting my IDE string to PHPstorm in it's settings.

我尝试在IDE和xdebug设置中设置不同的端口.

I've tried setting different ports in both my IDE and xdebug settings.

我还尝试使用sudo nc -l 9002监听这些端口 在主机和来宾计算机上,都没有任何连接,因此,这里的问题肯定是PHP服务器中的xdebug设置.

I've also tried listening to these ports with sudo nc -l 9002 on both host and guest machines, nothing connects so the problem here is definitely with xdebug settings in the PHP server.

推荐答案

请注意,我尝试了上面提供的所有解决方案

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

我的解决方案:

PHP7,Laravel 5.3和Homestead

for PHP7, Laravel 5.3 and homestead

vagrant ssh

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

从系统中清除hhvm后,xDebug会按预期工作.

After purging hhvm from the system xDebug works as expected.

说明:

在较新版本的laravel/homestead中, hhvm不再受支持,但仍在运行!

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

他们从文档中删除了所有描述. (Laravel 5.3)

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

hhvm: false不再起作用!

在Homestead.yml文件的每个可能位置都对其进行了尝试,但是如果重新配置并启动homestead,则hhvm实例仍在运行并在端口9000上侦听...

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...

首先,我尝试将xDebugs侦听端口更改为9089,该端口无效. (是的,我重新启动了fpm)

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

在某个时候,我很恼火,并且从家用机房中清除了hhvm.

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

现在一切正常.

注意:配置未重新安装.

Note: The provisioning is not reinstalling it.

希望这对某人有帮助,并感谢您为我指明了正确的方向

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

这篇关于宅基2 xdebug不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆