Eclipse 配置 php5.5 的 xdebug 调试功能

首先,是php.ini文件的配置。下载xdebug扩展文件(www.xdebug.com,我测试用的是wamp平台,已经配置了xdebug) ,并在php.ini配置文件中添加以下内容: 
zend_extension =
"c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll" [xdebug]
;开启远程调试 
xdebug.remote_enable = 1 xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = "c:/wamp/tmp" xdebug.show_local_vars=0 
;开启自动跟踪
xdebug.auto_trace = 1 ;开启异常跟踪
xdebug.show_exception_trace = 1 ;开启异常跟踪
xdebug.remote_autostart = 1 ;收集变量
xdebug.collect_vars = 1 ;收集参数
xdebug.collect_params = 1 ;trace输出路径
xdebug.trace_output_dir="C:/xdebug" ;以下三个分别是主机、端口、句柄 xdebug.remote_host="localhost" xdebug.remote_port=9000
xdebug.remote_handler="dbgp" 
保存文件后,查看phpifo()信息
_wk_4a13822a995c26270d055467b86dfae4_0.png

_wk_4a13822a995c26270d055467b86dfae4_0(1).png

其次,在配置Eclipse。打开“窗口/首选项”面板
_wk_4a13822a995c26270d055467b86dfae4_0(2).png

上面选项是我添加好的,其参数配置如下:

_wk_4a13822a995c26270d055467b86dfae4_0(3).png

然后,配置debug选项:

_wk_4a13822a995c26270d055467b86dfae4_0(4).png

PHP Server那个选项应该知道怎么配置吧,只是服务器访问的配置,很简单,就给阅者留点思考的余地吧!!
保存首选项配置后,点工具栏的调试,可以看效果了......

posted @ 2016-02-26 14:06  王永东gg  阅读(155)  评论(0)    收藏  举报