欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

xdebug

发布时间:2025/4/16 57 豆豆
生活随笔 收集整理的这篇文章主要介绍了 xdebug 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

首先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

转载于:https://www.cnblogs.com/georgelu/p/7661033.html

总结

以上是生活随笔为你收集整理的xdebug的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。