ubuntu 安装php xdebug

匿名 (未验证) 提交于 2019-12-02 22:11:45
http://xdebug.org/install.php#configure-php  A list of all settings:  http://xdebug.org/docs-settings.php      A list of all functions: http://xdebug.org/docs-functions.php     Profiling instructions:  http://xdebug.org/docs-profiling2.php    Remote debugging:        http://xdebug.org/docs-debugger.php  

下载 xdebug 最新的源码包

wget https://xdebug.org/files/xdebug-2.6.0.tgz

解压缩

tar -zxvf xdebug-2.6.0.tgz

编译安装

cd xdebug-2.6.0 phpize ./configure  --enable-xdebug  makemake install
  • 在php.ini中增加xdebug配置 xdebug.so路径 在安装完xdebug时控制台会有提示
[xdebug] zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler=dbgp #xdebug.remote_mode=req xdebug.remote_host=127.0.0.1 xdebug.remote_port=9001 xdebug.idekey=www #idekey=PHPSTORM ;注意这个autostart很关键,我就是加了这个才跑起来的 xdebug.remote_autostart=1 xdebug.remote_log=/var/xdebug.log
cd /etc/php/7.2/fpm/conf.d/ sudo ln -s /etc/php/7.2/mods-available/xdebug.ini 20-xdebug.ini cd /etc/php/7.2/cli/conf.d/ sudo ln -s /etc/php/7.2/mods-available/xdebug.ini 20-xdebug.ini
  1. cli 环境下,查看 php -m
  2. 测试 phpinfo,查看 xdebug 的信息 (略)
  3. phpstorm 测试 xdebug
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!