PHP在eclipse上的调试

用xdebug来进行调试。

 

1. 查看php是否线程安全

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

 

2. 下载xdebug插件

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

 

3. 配置php.ini

 

[XDebug]

扫描二维码关注公众号,回复: 730824 查看本文章

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

 

 

 

 

猜你喜欢

转载自chinsyouka.iteye.com/blog/2258018