PHP在eclipse上的调试

本文详细介绍了如何使用xdebug进行PHP调试,包括检查PHP线程安全性、配置xdebug插件、设置PHP.ini参数、在eclipse中配置调试工具等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用xdebug来进行调试。

 

1. 查看php是否线程安全

phpinfo() 中 查看thread safe属性是否是enable。

 

2. 下载xdebug插件

如使用的是xampp,则已经包括了该插件

 

3. 配置php.ini

 

[XDebug]

zend_extension = "D:\dev\xampp\php\ext\php_xdebug.dll"

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.auto_trace = 1

xdebug.profiler_output_dir = "D:\dev\xampp\tmp"

xdebug.profiler_output_name = "cachegrind.out.%t-%s"

xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"

xdebug.remote_host = "local.xxx-china.com"

xdebug.trace_output_dir = "D:\dev\xampp\tmp"

xdebug.remote_port=9000

 

4. eclipse 配置

打开preference菜单,进入php debug选项,选择调试工具为xdebug。



 

依次配置解释器位置php.exe



 

配置web选项,和path mapping

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值