使用Eclipse调试PHP程序

我安装的是PHP Version 5.3.26,按照网上提示在Eclipse中使用XDebug进行调试,不过配置了却使用不了,下面把解决方法简要说一下。

XDebug老是加载不了

From PHP 5.3 onwards, you always need to use the zend_extension PHP.ini setting name, and not zend_extension_ts, nor zend_extension_debug. However, your compile options (ZTS/normal build; debug/non-debug) still need to match with what PHP is using.

Php.ini中的配置

;debug configuration

zend_extension="D:/servers/php-5.3.8/ext/php_xdebug-2.1.3-5.3-vc9.dll"

;xdebug配置

[Xdebug] 

xdebug.remote_enable=1

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.collect_vars = On

xdebug.collect_return = On

xdebug.collect_params = On

Eclipse配置

在eclipse的项目里的Properties里面找到"PHP Debug",在PHP Debugger里面选择"XDebug"

再配置一下:

再在Windows->Preferences里面配置下PHP Servers

posted on   周 金根  阅读(6468)  评论(0编辑  收藏  举报

编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2010-12-05 育儿:自制身高仪和照片墙
2009-12-05 事物多面性的存在
2009-12-05 软件产品线工程方法 - BAPO之架构(Architecture)

导航

点击右上角即可分享
微信分享提示