xdebug超时连接到客户端. :-(使用phpstorm 7.1.3/vagrant/virtualbox/magento [英] xdebug Time-out connecting to client. :-( using phpstorm 7.1.3/vagrant/virtualbox/magento

查看:345
本文介绍了xdebug超时连接到客户端. :-(使用phpstorm 7.1.3/vagrant/virtualbox/magento的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一段时间,我使用的是Phpstorm EAP,并且让xdebug完美运行.我最近购买了个人许可证,并将我的所有设置从EAP导入了7.1.3.现在xdebug不起作用.

For a while, I was using Phpstorm EAP, and had xdebug running perfectly. I recently purchased a personal license and imported all my settings from the EAP into 7.1.3. Now xdebug does not work.

这是xdebug.ini

Here's xdebug.ini

zend_extension=xdebug.so

xdebug.remote_host = 192.168.56.1
xdebug.remote_cookie_expire_time = 36000
xdebug.remote_log = /tmp/xdebug.log
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.idekey="PHPSTORM"
xdebug.scream=0
xdebug.remote_connect_back=1
xdebug.show_local_vars=1

xdebug也显示在php.ini中.我什至在 http://xdebug.org/wizard.php 中运行了它,并安装了最新版本.

xdebug is also showing in the php.ini. I even ran it in http://xdebug.org/wizard.php and the latest version is installed.

Phpstorm正在9000端口上侦听xdebug,并且已打开侦听PHP调试连接".

Phpstorm is listening on port 9000 for xdebug, and "Listen for PHP Debug Connections" is on.

我的xdebug日志不断告诉我:

My xdebug log constantly tells me this:

Log opened at 2014-07-18 17:46:16
I: Checking remote connect back address.
I: Remote address found, connecting to 192.168.56.1:9000.
E: Time-out connecting to client. :-(
Log closed at 2014-07-18 17:46:16

我什至尝试了注册表无论我尝试什么,xdebug都会超时.即使关闭了所有防火墙.

No matter what I try, xdebug times out. Even with all firewalls off.

我在Windows 7 Enterprise上. VM是puphpet/centos65-x64

I'm on Windows 7 Enterprise. VM is puphpet/centos65-x64

编辑 忘记提及Phpstorm中的IDE密钥是PHPSTORM

EDIT Forgot to mention the IDE key in Phpstorm is PHPSTORM

推荐答案

要直接回答您的困惑,请注意两个设置.它们是xdebug.remote_hostxdebug.remote_connect_back.前一个设置的IP不正确,尤其是在Vagrant设置中.它应该类似于10.0.2.2.此外,不应定义和启用后一种设置.启用后,它会完全忽略先前的设置,从而使其无用.总而言之,前一个设置是错误的,而后一个设置将其忽略,但是后一个设置也是错误的.但是,这些设置只是Xdebug无法运行的部分原因.

To answer your confusion directly, two settings stand out. They are xdebug.remote_host and xdebug.remote_connect_back. The former setting's IP is incorrect, especially in a Vagrant setup. It should be something like 10.0.2.2. Furthermore, the latter setting should not be defined and enabled. When it is enabled, it completely ignores the former setting, thus rendering it useless. To summarize, the former setting is wrong, and the latter setting ignores it, but that latter setting is also wrong. These settings are only part of the reason Xdebug will not work, though.

Vagrant引入了标准,非虚拟化开发环境中不存在的一层复杂性.尽管以上几点可能是正确的,但仍然需要遵循其他设置和步骤才能通过Vagrant在PhpStorm中运行Xdebug.我为此苦了一段时间,经过几次失败的尝试,成功地建立了联系.在线文档中也存在大量缺陷,无法实现这种设置,因此在成功使整个设置生效之后,我在博客上记录了指南.详细描述了整个设置过程,并附有相关的屏幕截图.我也使用CentOS 6.5 64位,该指南反映了这一点.它甚至已经针对Magento进行了测试.

Vagrant introduces a layer of complexity not present in a standard, non-virtualized development environment. While the points above are probably correct, there are still additional settings and procedures that need to be followed in order to run Xdebug in PhpStorm through Vagrant. I struggled with this for a while, and after several failed attempts, succeeded in getting a connection. There is also a big deficit in documentation available online to achieve this kind of setup, so after successfully getting the whole setup working, I documented the guidelines on my blog. The entire setup process is described in detail, peppered with relevant screenshots. I also use CentOS 6.5 64bit, and the guidelines reflect that. It has even been tested against Magento.

如何通过Vagrant在PhpStorm中配置Xdebug

这篇关于xdebug超时连接到客户端. :-(使用phpstorm 7.1.3/vagrant/virtualbox/magento的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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