PHPStorm无法与xdebug建立外部连接

use*_*973 11 ide xdebug phpstorm

我的操作系统是Mac Mountain lion.

我的PhpStorm版本是5.0.4.

这是我的php xdebug信息:

  • xdebug.remote_autostart => Off => Off
  • xdebug.remote_connect_back =>关=>关
  • xdebug.remote_cookie_expire_time => 3600 => 3600
  • xdebug.remote_enable => On => On
  • xdebug.remote_handler => dbgp => dbgp
  • xdebug.remote_host => 127.0.0.1 => 127.0.0.1
  • xdebug.remote_log => data/logs/xdebug.log => data/logs/xdebug.log
  • xdebug.remote_mode => req => req
  • xdebug.remote_port => 9000 => 9000
  • xdebug.idekey =>没有值=>没有值

我可以在PhpStorm中调试PhpScript Run Type,它运行正常.所以我认为xdebug配置得很好.

但是在我尝试遵循"零配置调试"(使用Web应用程序运行类型)后,Phpstorm无法连接传入连接.

这是我的步骤:

  1. 单击开始Listion Php Connection.(将呼叫切换为绿色)
  2. 单击PhpScript中的第一行的Run-> Break,并在第一个语句处设置断点.
  3. 选择My WebApplication Config,然后单击Debug按钮.然后启动chrome并链接到我的phpscript.(使用?XDEBUG_SESSION_START = 19869)
  4. 在PhpStorm中,调试器显示等待与ide键'19869'的传入连接.
  5. 在期刊中,打印lsof -i4TCP:9000.

    命令PID用户FD类型设备大小/关闭节点名称
    webide 288 wangfeng 69u IPv6 0xa83881cdce30c579 0t0 TCP*:cslistener(LISTEN)

  6. 打开Chrome的开发者工具,选择Cookie.

    XDEBUG_SESSION 19869 localhost/Wed,2013年1月30日05:27:17 GMT 19

  7. 刷新Chrome.Not能够连接PhpStorm调试连接.

额外:

  • 我的防火墙关闭了.
  • 我的服务器是nginx.My phpwebapp和服务器都在我的本地机器上.

它会导致ipv6吗?

希望有所帮助!我已经尝试了所有东西,扩展bookmarklets,根本不工作.

rex*_*das 14

某些其他进程可能正在使用端口9000.

  1. 在php.ini中设置xdebug.remote_port=9001或您选择的其他未使用的端口.
  2. 在PHPStorm中,转到Settings-> PHP-> Debug,在Xdebug部分下,将Debug端口设置为9001.
  3. 重新启动Web服务器.
  4. 开始调试.