php7 -m | grep xdebug
xdebugは2系と3系があります。 今回は2.9.8 をインストールします。
rootユーザから次のように実行します
cd
mkdir xdebug_install
cd xdebug_install
wget https://pecl.php.net/get/xdebug-2.9.8.tgz
tar xfvz xdebug-2.9.8.tgz
cd xdebug-2.9.8/
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make && make install
echo 'zend_extension = xdebug.so' > /etc/php7.d/extensions/xdebug.ini
設定ファイルにオプションを追加する場合は以下のファイル(xdebug.ini)に追記します
vi /etc/php7.d/extensions/xdebug.ini
xdebug バージョン3系の場合
以下を追記します
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug バージョン2系の場合
以下を追記します
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.remote_port = 9002
kusanagi restart
php7 -m | grep xdebug