PHPEclipse + XDebug+ APMServ5.26现实PHP调试的方法

参考资料:

1.

2. http://www.phpeclipse.com/wiki/Howto/XDebugAndPHPEclipse

1.下载XDebug http://xdebug.org/download.php

选择于PHP版本相对应的的 5.2 VC6 (32 bit) 下载,改名成php_xdebug.dll后复制到E:/APMServ5.2.6/PHP/ext/中

2. 在php.ini中添加以下内容,并将zend的其他应用关掉(注释掉其他zend_extension_ts语句)

[Xdebug]

zend_extension_ts="E:/APMServ5.2.6/PHP/ext/php_xdebug.dll"

xdebug.remote_enable=On

xdebug.remote_autostart=On

xdebug.remote_handler=dbgp

xdebug.remote_host=192.168.1.100

xdebug.remote_port=9000

xdebug.remote_mode=req

/***

xdebug配置

打开php.ini

在最后一行加入以下配置代码,配置说明已经做好注释

;载入Xdebug

zend_extension_ts="c:/php/ext/php_xdebug.dll"

;xdebug配置

[Xdebug]

;开启自动跟踪

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

注意zend_extension_ts后面的路径要填写绝对路径,保存后重启服务器即可。

本篇文章来源于PHP论坛 文章地址:http://bbs.php.cn/viewthread.php?tid=20477&highlight=Eclipse

**/

phpinfo()中看到with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans就算成功加载了Xdebug了

3.下载classic版的Eclipse(没有装PDT插件的),使用http://update.phpeclipse.net/update/stable/1.2.x网址安装phpeclipse,记得不要选择DBG的插件

4.在Eclipse中preferences->phpeclipse->xdebug中,输入9000和E:/APMServ5.2.6/PHP/php.exe

5.在run->debug configuration中输入Ide Identification String,比如debug,只能是英文,不能使数字,简短易记就行;双击PHP XDebug Remote Script,在Pathmap 中的Local Path和Remote Path中输入项目的存储位置 E:/APMServ5.2.6/www/htdocs/GetFootballContent/ (不要忘记最后的斜线!!!),

6.在任意浏览器中运行E:/APMServ5.2.6/www/htdocs/GetFootballContent/目录下你想debug的php文件,在url后面加上 ?XDEBUG_SESSION_START=debug (debug就是Ide Identification String)。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值