How to setup xdebug 3.0 with PhpStorm on macOS Big Sur
Assuming you have already installed PHP at 7.4, I am going to install xdebug.
pecl install --force xdebug
This will add [zend_extension="xdebug.so"] to your php.ini file. Just add a few more settings below that.
[xdebug]
zend_extension="xdebug.so"
xdebug.mode=debug
xdebug.client_host=127.0.0.1
In order to locate your php.ini file, just type php --ini in your terminal.
Now, let's check the PhpStorm configuration for the same. We have to just make sure that the default changes are there, nothing else. Please refer to the below image for reference:
Navigate to PhpStorm → preferences...
Get the Xdebug helper extension for your browser and set the following settings and click on the save button.
Now in PhpStorm, let's click on the icon to start listening to the debug connection.
Set any break points in the code base and reload the site from the browser. There should be a pop-up coming up for a new connection. Accept it and continue debugging.
- Log in to post comments