bri*_*ser 13 php xdebug magento phpstorm vagrant
有一段时间,我正在使用Phpstorm EAP,并且xdebug完美运行.我最近购买了个人许可证,并将我在EAP中的所有设置导入7.1.3.现在xdebug不起作用.
这是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
Run Code Online (Sandbox Code Playgroud)
xdebug也在php.ini中显示.我甚至在http://xdebug.org/wizard.php中运行它并安装了最新版本.
Phpstorm正在侦听端口9000上的xdebug,并且"侦听PHP调试连接"已启用.
我的xdebug日志经常告诉我这个:
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
Run Code Online (Sandbox Code Playgroud)
我甚至尝试过注册表编辑:http://brianreiter.org/2010/09/18/fix-virtualbox-host-only-network-adapter-creates-a-virtual-public-network-connection-that-causes -Windows到禁用服务/
无论我尝试什么,xdebug都会超时.即使关闭了所有防火墙.
我在Windows 7 Enterprise上.VM是puphpet/centos65-x64
编辑 忘了在Phpstorm中提到IDE密钥是PHPSTORM
dan*_*lan 11
为了直接回答您的困惑,两个设置脱颖而出.他们是xdebug.remote_host和xdebug.remote_connect_back.前一个设置的IP不正确,尤其是在Vagrant设置中.应该是这样的10.0.2.2.此外,不应定义和启用后一种设置.启用后,它会完全忽略前一个设置,从而使其无效.总而言之,前一种设置是错误的,后一种设置忽略了它,但后一种设置也是错误的.但是,这些设置只是Xdebug无法工作的部分原因.
Vagrant引入了标准的非虚拟化开发环境中不存在的复杂层.虽然上述几点可能是正确的,但是为了通过Vagrant在PhpStorm中运行Xdebug,还需要遵循其他设置和过程.我挣扎了一段时间,经过几次尝试失败,成功获得了连接.在线文档也存在很大的不足以实现这种设置,因此在成功完成整个设置后,我在我的博客上记录了指南.详细描述了整个设置过程,并附有相关的屏幕截图.我也使用CentOS 6.5 64位,指南反映了这一点.它甚至已经针对Magento进行了测试.
| 归档时间: |
|
| 查看次数: |
9769 次 |
| 最近记录: |