phpstorm vagrant xdebug

用mac + vagrant有段时间 ,因为最近要看一YII2,所以又用起了XDEBUG

zend_extension=xdebug.so
;开启远程xdebug
xdebug.remote_enable=on
;远程通讯协议
xdebug.remote_handler=dbgp
;xdebug.remote_host=127.0.0.1
;
xdebug.remote_connect_back=on
xdebug.remote_port=9000
xdebug.idekey=PhpStorm
来说明下常用的几个选项

xdebug.remote_host
这个选项指定一个客服端连接IP/HOST(也就是这里的phpstorm所在机子上的ip/host)

xdebug.remote_connect_back
官方解释:
If enabled, the xdebug.remote_host setting is ignored and Xdebug will try to connect to the client that made the HTTP request. It checks the $_SERVER['REMOTE_ADDR'] variable to find out which IP address to use. Please note that there is no filter available, and anybody who can connect to the webserver will then be able to start a debugging session, even if their address does not match xdebug.remote_host.
大至意思是:
如果开启这个选项将忽略xdebug.remote_host选项,它会去自动检测PHP中的 $_SERVER['REMOTE_ADDR']变量,请注意它没有过滤,谁都可以连接到这个网络

xdebug.remote_port
远程连接的端口号

xdebug.max_nesting_level = 10000
如果设得太小,函数中有递归调用自身次数太多时会报超过最大嵌套数错

xdebug.idekey

PhpStorm客户端配置





xdebug.idekey
posted @ 2015-06-29 17:48  tywei  阅读(219)  评论(0)    收藏  举报