vagrant ssh
sudo yum install --enablerepo=remi-php72 php-xdebug -y
Check the location of the Xdebug module
sudo find / -name "xdebug.so"
Editing php.ini
sudo vi /etc/php.ini
Finally added below Host is set to 10.0.2.2 for vagrant
[xdebug]
zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=10.0.2.2
xdebug.remote_port=9001
xdebug.idekey="phpstorm"
xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
Server restart
sudo systemctl restart php-fpm
sudo systemctl restart nginx
Create a php.info file and succeed if info shows xdebug configuration related
Be especially careful as you are frustrated
Select remote for language setting
Debug settings:
IDE key and host settings (host has already been set in vagrant.file)
The local path is the root of the project, not public.
The path of the virtual environment is also the root.
Start-up:
Recommended Posts