无法使用PhpStorm + Vagrant + XDebug进行调试 [英] Cannot debug with PhpStorm + Vagrant + XDebug

查看:111
本文介绍了无法使用PhpStorm + Vagrant + XDebug进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让XDebug在Windows 7计算机上与PhpStorm和Vagrant一​​起使用.我已经按照每个教程进行了操作,但是没有运气.

I cannot get XDebug to work with PhpStorm and Vagrant on a Windows 7 machine. I've already followed every tutorial on getting this to work but with no luck.

所以我尝试的是:

  • PhpStorm始终侦听调试连接
  • xdebug.ini文件,其中包含以下内容:

zend_extension = "..../xdebug.so"
xdebug.remote_enable= 1
xdebug.remote_handler=dbgp
xdebug.remote_host= 33.33.33.10
xdebug.remote_port= 9000
xdebug.remote_connect_back= 1
xdebug.remote_autostart= 1
xdebug.remote_log = "...."

  • 设置PhpStorm以连接到localhost:8080以及33.33.33.10,都没有运气.
  • 日志文件始终输出:
    • Setup PhpStorm to connect to localhost:8080 and too 33.33.33.10, both with no luck.
    • The log file always outputs:
    • I: Checking remote connect back address.
      W: Remote address not found, connecting to configured address/port: 33.33.33.10:9000. :-|
      E: Could not connect to client. :-(
      

      • 当我尝试调试时,防火墙(ESET Smart Security)始终关闭
      • 设置路径映射也不起作用
      • 我只是不知道该怎么办,但我确实需要能够进行调试.
        感谢您的帮助!

        I just don't know what to do, but I really NEED to be able to debug.
        Thanks for your help!

        推荐答案

        问题非常愚蠢-我在Vagrantfile中转发了端口9000,而不必这样做...

        The problem was very stupid - I forwarded port 9000 in the Vagrantfile, and I didn't have to do so...

        现在,实际上我看到xdebug.ini中唯一需要的行是:

        Now, actually I see that the only necessary lines in xdebug.ini are:

        zend_extension = ...
        xdebug.remote_enable = on
        xdebug.remote_connect_back = on
        

        如果您不做愚蠢的事情,则设置非常简单...

        The setup is pretty straightforward, if you don't do stupid things...

        这篇关于无法使用PhpStorm + Vagrant + XDebug进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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