1 选择你的版本
比如我的:
关键是这三项:
PHP Version 7.3.0
Architecture x86 (x86是32位系统,X64指的是64位系统)
Zend Extension Build API320180731,TS,VC15
然后去官网下载对应的文件
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 说明已安装完成
标签:Xdebug,remote,Windows,profiler,ext,xdebug,output,php
来源: https://www.cnblogs.com/polax/p/10595499.html