1 选择你的版本?php phpinfo(); ?比如我的: 关键是这三项:PHP Version 7.3.0Architecture x86 (x86是32位系统,X64指的是64位系统)Zend Extension Build API320180731,TS,VC15 ...

1 选择你的版本
<?php phpinfo(); ?>
比如我的:
关键是这三项:
PHP Version 7.3.0
Architecture x86 (x86是32位系统,X64指的是64位系统)
Zend Extension Build API320180731,TS,VC15
然后去官网下载对应的文件
https://xdebug.org/download.php
2 将下载的文件放入你的php\ext目录
比如我的目录是 F:\xmapp\php\ext
3 编辑php.ini
插入以下代码
[Xdebug] ;指定Xdebug扩展文件的绝对路径 zend_extension=F:\xmapp\php\ext\php_xdebug-2.7.0-7.3-vc15.dll ;启用性能检测分析 xdebug.profiler_enable=On ;启用代码自动跟踪 xdebug.auto_trace=on ;允许收集传递给函数的参数变量 xdebug.collect_params=On ;允许收集函数调用的返回值 xdebug.collect_return=On ;指定堆栈跟踪文件的存放目录 xdebug.trace_output_dir="C:\Users\Administrator\Desktop\xdebug" ;指定性能分析文件的存放目录 xdebug.profiler_output_dir="C:\Users\Administrator\Desktop\xdebug" xdebug.profiler_output_name = "cachegrind.out.%p" xdebug.remote_enable = On xdebug.remote_port=9000 xdebug.remote_handler = dbgp xdebug.remote_host = localhost xdebug.var_display_max_depth = 10
4 重启apache
5 再次查看phpinfo()
出现xdebug 说明已安装完成
织梦狗教程
本文标题为:Windows 安装php调试工具 Xdebug


基础教程推荐
猜你喜欢
- PHP删除数组中指定值的元素常用方法实例分析【4种方法】 2022-11-12
- php中使用array_filter()函数过滤数组实例讲解 2023-05-19
- TP5 连接多个数据库及使用方法 2023-08-30
- thinkPHP3.2.2框架行为扩展及demo示例 2022-11-07
- PHP使用SMTP邮件服务器发送邮件示例 2022-11-16
- PHP数据加密方式梳理介绍 2023-07-03
- TP5(thinkPHP5框架)基于bootstrap实现的单图上传插件用法示例 2023-01-19
- PHP实现生成数据字典功能示例 2022-10-18
- PHP实现创建一个RPC服务操作示例 2023-04-01
- laravel model模型定义实现开启自动管理时间created_at,updated_at 2023-03-02