$ pecl install xdebug $ vim /usr/local/etc/php/7.2/php.ini Remove the line zend_extension=xdebug.so $ vim /usr/local/etc/php/7.4/conf.d/ext-xdebug.ini Add the line: zend_extension="/usr/local/Cellar/php/7.4.4/pecl/20190902/xdebug.so The correct path to add here is provided at the end of pecl installation. Restart Apache