http://xdebug.org/install.php#configure-php
Debugger Configuration Validation with PhpStorm
on CentOS: 1. You need to install PHP’s devel package for PHP commands execution yum install php-devel yum install php-pear 2. Next install GCC and GCC C++ compilers to compile Xdebug extension yourself. yum install gcc gcc-c++ autoconf automake 3. Compile Xdebug pecl install Xdebug 4. Find the php.ini file using locate php.ini And add the following line [xdebug] zend_extension="/usr/lib64/php/modules/xdebug.so" xdebug.remote_enable = 1 5. Restart Apache service httpd restart 6. Test if it works – create test.php with the following code phpinfo()

 

 

PHP72

 

yum install --enablerepo=epel,remi-php72   php-devel
yum install --enablerepo=epel,remi-php72  php-pear
yum install gcc gcc-c++ autoconf automake

nano /etc/php.ini
в конце добавляем

[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1


 
 pecl install xdebug
sudo systemctl restart php-fpm

 

 

В файлe php.ini добавить раздел [xdebug] с требуемыми параметрами, вот что  содержится в моем файле:

[xdebug]
xdebug.default_enable=on
xdebug.remote_enable=on
xdebug.remote_autostart=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/tmp/xdebug_log.log"
xdebug.profiler_output_dir="/tmp"

 

 

В случае необходимости создать исключения для порта 9000:

 

semanage port -a -t http_port_t -p tcp 9000

Настраиваем NetBeans

  • Tools – Options – PHP
  • Вкладка General – для параметра PHP interpreter, указать /usr/bin/php, отметить параметры – Output Window, Web Browser
  • Вкладка Debugging – оставить все парамтры по умолчанию (Debugger – port 9000, Dession ID – netbeans-xdebug), убрать флажок с параметра Stop at First Line
  • В файл /usr/local/netbeans/etc/netbeans.conf добавить настройку параметра netbeans_default_options:

-J-Dorg.netbeans.modules.php.dbgp.level=400

 

 

SF 2 console if not work на самом сервере выполнить

export XDEBUG_CONFIG=”remote_host=192.168.80.254 idekey=PHPSTORM”
echo $XDEBUG_CONFIG

 

 

/etc/php/7.0/mods-available
sudo service php7.0-fpm restart
export XDEBUG_CONFIG=’remote_host=192.168.81.228 idekey=PHPSTORM’

export XDEBUG_CONFIG=’remote_host=localhost idekey=phpstorm’

Как настроить Xdebug в PhpStorm

https://freshnotes.org/2016/12/ustanovka-i-nastrojka-xdebug-phpstorm-v-ubuntu-16-04-elementary-os-0-4-loki-mint-18/