環境概要
Summary
Xdebug installed: no
Server API: Command Line Interface
Windows: no
Zend Server: no
PHP Version: 7.4.5
Zend API nr: 320190902
PHP API nr: 20190902
Debug Build: no
Thread Safe Build: no
OPcache Loaded: yes
Configuration File Path: /usr/local/etc/php/7.4
Configuration File: /usr/local/etc/php/7.4/php.ini
Extra Configuration Files Path: /usr/local/etc/php/7.4/conf.d
Extra Configuration Files:
/usr/local/etc/php/7.4/conf.d/ext-opcache.ini
Extensions directory: /usr/local/lib/php/pecl/20190902
手順
php.iniからXdebugのインストール手順を把握する
下記の記事を参考に、
xdebug.orgでXdebugのインストール手順を把握する
php -i > phpinfo.txt
でphp.iniに書かれている内容を書き出し、
その内容をxdebug.orgに転記する。
具体的なインストール手順
- Download xdebug-3.1.5.tgz
2.Install the pre-requisites for compiling PHP extensions.
On your Mac, we only support installations with 'homebrew',
andbrew install php && brew install autoconf
should pull in the right packages. - Unpack the downloaded file with tar -xvzf xdebug-3.1.5.tgz
- Run: cd xdebug-3.1.5
- Run: phpize (See the FAQ if you don't have phpize).
As part of its output it should show:
Configuring for:
...
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.
- Run:
./configure
- Run:
make
- Run:
cp modules/xdebug.so /usr/local/lib/php/pecl/20190902
- Create /usr/local/etc/php/7.4/conf.d/99-xdebug.ini and add the line:
zend_extension = xdebug