我正在尝试使用 Xdebug 和 PhpStorm 进行调试。我过去设置过几次,没有太多问题。这一次,事情并没有那么顺利。
我当前在php.ini 中的配置如下:
zend_extension = "c:\xampp2\php\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=127.0.0.1
xdebug.remote_cookie_expire_time=3600
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey=PHPSTORM
xdebug.remote_log="c:\xampp2\tmp\xdebug.txt"
xdebug.remote_autostart=1
添加xdebug.remote_autostart
确保在从 CLI 运行脚本时建立连接。但是,通过 Apache 调用脚本时它仍然不起作用。
我检查了 Xdebug 日志,没有看到任何异常:https : //pastebin.com/4rK8pJqt
最明显的原因是CLI 和 Apache有单独的php.ini文件,但事实并非如此。我只有一个php.ini文件,并且我已经验证 Xdebug 设置在浏览器的 phpinfo 中显示得很好。请参阅下面的屏幕截图。
是否有任何特定设置可能导致 Xdebug 无法连接到 PHPStorm?或者是否有人知道 Xdebug 或 PhpStorm 中可能导致此问题的任何错误?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句