参考资料:
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)。