码迷,mamicode.com
首页 > 其他好文 > 详细

xdebug

时间:2017-10-13 14:58:34      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:deb   orm   mode   php5   pen   pst   html   客户端   append   

首先php需要开始xdebug的扩展

然后,修改php配置文件

[XDebug]

xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.trace_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.profiler_output_name = "cache.out.%t-%s"
xdebug.remote_enable = 1            #开启
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
zend_extension="D:\phpStudy\php53n\ext\xdebug.dll"
xdebug.idekey= PHPSTROM

 

其中remote_host 是指调试客户端的地址,即IDE所在的IP,同理remote_port 是客户端的端口,这两项在远程调试的情况下注意修改,远程的时候最终改为:

[XDebug]

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

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

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

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

xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"

xdebug.remote_mode = "req"

xdebug.remote_port = 9000

最后重启apache检查是否成功开启了xdebug服务。

一种方法为在CMD里输入D:\xampp\php\php.exe -m 看到XDebug,说明成功开启XDebug。

另一种方法为浏览器打开localhost,找到phpinfo()点击打开配置情况,查找xdebug项,找到了说明xdebug配置成功。

 

此时配合PhpStorm使用,参考http://www.cnblogs.com/neng-zheng/p/6209236.html

xdebug

标签:deb   orm   mode   php5   pen   pst   html   客户端   append   

原文地址:http://www.cnblogs.com/georgelu/p/7661033.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!