【问题标题】:Setting up phpstorm with xdebug使用 xdebug 设置 phpstorm
【发布时间】:2013-07-28 18:22:38
【问题描述】:

我一直在尝试使用 phpstorm 设置远程(虚拟机服务器)调试。当我按下调试按钮 phpstorm 只是无限期地等待连接。几天来我一直在寻找解决方案,但无法得到任何不同的结果。

这些是我的 phpstorm 设置: 主机:mywebsite.dev 端口:9000 调试器:Xdebug 路径映射:/public /index.php

这些是我在 php.ini 中的 xdebug 参数

xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=on
xdebug.remote_port=9000
xdebug.default_enable=on
xdebug.remote_mode=req
xdebug.remote_log=/var/log/xdebug/xdebug.log

如果您需要更多信息,请告诉我。提前致谢!

【问题讨论】:

标签: xdebug phpstorm


【解决方案1】:

本教程在 Ubuntu 中对我有用

http://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide

我注意到您的 php.ini 看起来有点不同。这是我的:

[Xdebug]
zend_extension=<full_path_to_xdebug_extension>
xdebug.remote_enable=1
xdebug.remote_host=<the host where PhpStorm is running (relative to your site!)>
xdebug.remote_port=9000

就是这样。

【讨论】:

    【解决方案2】:

    为它的见鬼回答一个旧帖子......

    您还需要编辑 20-xdebug.ini 文件 sudo nano /etc/php5/conf.d/20-xdebug.ini zend_extension=xdebug.so 应该已经存在。添加以下行:

        zend_extension=xdebug.so
        xdebug.remote_enable = 1
        xdebug.remote_connect_back = 1
        xdebug.remote_port = 9000
        xdebug.scream=0 
        xdebug.cli_color=1
        xdebug.show_local_vars=1
    

    也可能存在路径映射问题。 如果您进入运行|Web 服务器调试验证……您会收到错误消息吗?如果是这样,这就是您仍然需要解决的问题的线索。

    您还必须在浏览器中设置 xdebug 扩展的密钥。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-29
      • 2014-08-10
      • 2015-07-04
      • 1970-01-01
      • 2014-12-03
      • 2021-08-28
      • 2022-01-09
      相关资源
      最近更新 更多