Heim  >  Artikel  >  php教程  >  Eclipse配置php5.5的xdebug调试功能

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

WBOY
WBOYOriginal
2016-06-06 19:47:441128Durchsuche

首先,是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] ;

首先,是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()信息

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

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



其次,在配置Eclipse。打开“窗口/首选项”面板

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

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

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


然后,配置debug选项:

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


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

 

制作人:飞虎                                           无兄弟不编程!
=====================================================================================
欢迎加QQ群进行更多交流:305397511     专注于php、mysql、jquery以及开源框架

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn