gpt4 book ai didi

xdebug - 无法使用 PhpStorm + Vagrant + XDebug 进行调试

转载 作者:行者123 更新时间:2023-12-03 11:49:06 27 4
gpt4 key购买 nike

我无法让 XDebug 在 Windows 7 机器上与 PhpStorm 和 Vagrant 一起工作。我已经按照每个教程来让这个工作,但没有运气。

所以我试过的是:

  • 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 ,两者都没有运气。
  • 日志文件总是输出:

  • 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) 总是关闭
  • 设置路径映射,也没有用

  • 我只是不知道该怎么做,但我真的需要能够调试。
    谢谢你的帮助!

    最佳答案

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

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

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

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

    关于xdebug - 无法使用 PhpStorm + Vagrant + XDebug 进行调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15339165/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com