Window安装
1.Xdebug官网
https://xdebug.org/download.php
2.选择相对应版本Xdebug下载
3.将dll文件放到PHP下的ext文件夹内(建议)
4.配置php.ini
xdebug.profiler_output_dir="E:\phpStudy\tmp\xdebug"
xdebug.trace_output_dir="E:\phpStudy\tmp\xdebug"
zend_extension="E:\phpStudy\php\php-7.0.32-nts\ext\php_xdebug-2.6.1-7.0-vc14-nts.dll"
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.max_nesting_level = 500
xdebug.remote_enable = On
;启用性能检测分析
xdebug.profiler_enable = On
;启用代码自动跟踪
xdebug.auto_trace=On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
;指定性能分析文件的存放目录
xdebug.show_local_vars=0
;配置端口和监听的域名
xdebug.remote_host="localhost"
5.重启中间器(apache)和php服务
Centos7.0 安装Xdebug
1.Xdebug官网
2.下载Xdebug
wget https://xdebug.org/files/xdebug-2.6.0.tgz
3.解压
tar -zxvf xdebug-2.6.0.tgz
4.安装
phpize
./configure
make && make install
5.php.ini修改配置
zend_extension=xdebug.so
xdebug.profiler_enable=on
xdebug.trace_output_dir="/usr/local/php/xdebug_trace"#程序执行顺序日志 在对应位置建立文件夹并授权
xdebug.profiler_output_dir="/usr/local/php/xdebug_profiler"#程序执行性能日志
6.重启中间器(apache)和php服务
systemctl restart httpd
systemctl restart php-fpm