PHPStorm无法与xdebug建立外部连接 [英] PHPStorm unable to make external connection with xdebug
问题描述
我的操作系统是Mac Mountain Lion。
My OS is Mac Mountain lion.
我的PhpStorm版本是5.0.4。
My PhpStorm version is 5.0.4.
这是我的php xdebug信息:
Here is my php xdebug info:
- xdebug.remote_autostart => 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 =>无值=>无值
- xdebug.remote_autostart => Off => Off
- xdebug.remote_connect_back => Off => Off
- 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 => no value => no value
我可以在PhpStorm中调试PhpScript Run Type,它运行正常。所以我认为xdebug配置得很好。
I can debug PhpScript Run Type in PhpStorm,It works fine.So I think xdebug configure well.
但是在我尝试遵循Zero之后配置调试(使用Web应用程序运行类型),Phpstorm无法连接传入连接。
But after I try follow the "Zero Configure Debug"(Which with Webapplication Run Type),Phpstorm can not connect with the incoming connection.
这里我我的步骤:
- 点击开始Listion Php Connection。(将呼叫切换为绿色)
- 单击PhpScript中第一行的Run-> Break,并在第一个语句处设置断点。
- 选择My WebApplication Config并单击Debug按钮。然后启动chrome并链接到我的phpscript。 ?XDEBUG_SESSION_START = 19869)
- 在PhpStorm中,调试器显示等待与ide键'19869'的传入连接。
- 在termial中,打印
lsof -i4TCP:9000
。
- Click Start Listion Php Connection.(Toggle the call to green)
- Click Run->Break at first line in PhpScript,and set breakpoint at first statement.
- Choose My WebApplication Config and click Debug button.Then it launches chrome and link to my phpscript.(with ?XDEBUG_SESSION_START=19869)
- In PhpStorm,Debugger shows Waiting for incoming connection with ide key '19869'.
- In termial,print
lsof -i4TCP:9000
.
命令PID用户FD类型设备大小/关闭节点名称
webide 288 wangfeng 69u IPv6 0xa83881cdce30c579 0t0 TCP *: cslistener(LISTEN)
打开Chrome的开发者工具,选择Cookies。
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
webide 288 wangfeng 69u IPv6 0xa83881cdce30c579 0t0 TCP *:cslistener (LISTEN)Open Chrome's Developer Tool,Select Cookies.
XDEBUG_SESSION 19869 localhost / Wed,2013年1月30日05:27:17 GMT 19
XDEBUG_SESSION 19869 localhost / Wed, 30 Jan 2013 05:27:17 GMT 19
其他:
- 我的防火墙已关闭。
- 我的服务器是nginx.My phpwebapp和服务器都在我的本地机器上。
它是否会导致ipv6?
Does it cause ipv6?
希望有所帮助!我已尝试所有内容,扩展bookmarklet,根本无法使用。
Hopes help!I have try everything,extensions bookmarklets,not work at all.
推荐答案
某些其他进程可能正在使用端口9000。
It's possible that port 9000 is being used by some other process.
- 在php.ini中设置
xdebug.remote_port = 9001
或其他未使用的端口您选择。 - 在PHPStorm中,转到设置 - > PHP->调试,在Xdebug部分下,将调试端口设置为9001.
- 重新启动您的网站服务器。
- 开始调试。
- In php.ini set
xdebug.remote_port=9001
or another unused port of your choosing. - In PHPStorm go to Settings->PHP->Debug and under the Xdebug section set Debug port to 9001.
- Restart your web server.
- Start debugging.
这篇关于PHPStorm无法与xdebug建立外部连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!