eclipse和xdebug调试PHP配置方法

工欲善其事必先利其器,要想写好好的程序,不光要有好的思想,好的编程习惯,也要有一个好的开发利器

eclipse不能不说是一个强大的IDE。

对于不同的开发人员,有不同的版本,我们可以下载eclipse for php

这里已集成了pdt的配置。

我们只要下载最新的xdebug就行了,去http://xdebug.com上下载最新的dll文件

放到和php.ini同一个目录中(也可以放到别的目录下)

在php.ini文件中加入

[Xdebug]
xdebug.default_enable = On   
xdebug.collect_params = 4   
xdebug.remote_host = 127.0.0.1   
xdebug.remote_port = 9000   
xdebug.remote_handler = dbgp   
xdebug.auto_trace = On    
xdebug.show_exception_trace = On    
xdebug.remote_autostart = On    
xdebug.remote_enable = On    
xdebug.collect_vars = On    
xdebug.collect_return = On    
xdebug.collect_params = On   
xdebug.var_display_max_depth = 10   
xdebug.remote_req = req   
xdebug.profiler_enable = 0   
zend_extension="D:\wamp\bin\php\php5.3.0\php_xdebug.dll" //这里我指定了绝对路径你可以改之

 在eclipse里的window---preferences---php---debug下新建一个php executables

php debugger里选择xdebug,Encoding Settings 建议选择utf8

Break at first line 如果去掉的话则不会在第一行就将程序断掉,等待你按下F5或者F6继续

 至此设置结束,打开你的程序,按下F11。再进行F5或者F6就能调试了,是不是很爽啊

最喜欢的就能这种能断点能查看变量值的调试方式了

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值