Last active
January 25, 2021 06:43
-
-
Save ascorbic-acid/b1e97de1621f7e1849f0d8ee2ed8005c to your computer and use it in GitHub Desktop.
Wordpress xDebug install Ubuntu 18.04 VSCODE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt install php-xdebug | |
# [7.2] path may be different on your system, check it. | |
sudo nano /etc/php/7.2/mods-available/xdebug.ini | |
Add the following code into xdebug.ini file: | |
zend_extension=/usr/lib/php/20151012/xdebug.so # [20151012] path may be different on your system, check it. | |
xdebug.remote_autostart = 1 | |
xdebug.remote_enable = 1 | |
xdebug.remote_handler = dbgp | |
xdebug.remote_host = 127.0.0.1 | |
xdebug.remote_log = /tmp/xdebug_remote.log | |
xdebug.remote_mode = req | |
xdebug.remote_port = 9093 #if you want to change the port you can change | |
And then restart the services: | |
sudo systemctl restart php7.2-fpm | |
sudo systemctl restart nginx # If you are using nginx server | |
sudo systemctl restart apache2 # If you are using apache server | |
And add VSCODE extension [PHP Debug] by Felix Becker and click add | |
Go to run menu and click on Add Configuration for php and set port, in our case 9093 | |
then start debugging ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment