PHP
Xdebug на удаленном сервере и PHPStorm
First, install latest Xdebug:
If you don't have pecl installed already:
sudo apt -y install php7.4-dev php-pear // replace php7.4 with your version
Run pecl to install xdebug:
sudo pecl install xdebug
sudo vim /etc/php/7.4/apache2/php.ini // again replace 7.4 with your version
Configure your php.ini
[xdebug]
zend_extension="<path to xdebug extension>"
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port="<the port (9003 by default) to which Xdebug connects>"
Configure your IDE
File -> Settings -> PHP -> Debug
File -> Settings -> PHP -> Servers
Name: Anything meaningful for you
Host: Server IP address
Port: The port used by Apache
Debugger: Select Xdebug
Check the “Use path mapping” option
You need an SSH Tunnel
ssh -R 9000:localhost:9000 your_user@your_server_host
Profit!!
sources:
Афоризм дня:
Многие многознайки не имеют ума. (555)
Leave a reply