环境:mac 10.15.4
zcm@zcmdeMacBook-Pro 0902 % php -vPHP 7.4.9 (cli) (built: Aug 7 19:23:06) ( NTS )Copyright (c) The PHP GroupZend Engine v3.4.0, Copyright (c) Zend Technologieswith Xdebug v2.9.6, Copyright (c) 2002-, by Derick Rethanszcm@zcmdeMacBook-Pro 0902 % php-fpm -vPHP 7.4.9 (fpm-fcgi) (built: Aug 7 19:23:16)Copyright (c) The PHP GroupZend Engine v3.4.0, Copyright (c) Zend Technologieswith Xdebug v2.9.6, Copyright (c) 2002-, by Derick Rethanszcm@zcmdeMacBook-Pro 0902 % php --iniConfiguration File (php.ini) Path: /usr/local/etc/php/7.4Loaded Configuration File: /usr/local/etc/php/7.4/php.iniScan for additional .ini files in: /usr/local/etc/php/7.4/conf.dAdditional .ini files parsed:/usr/local/etc/php/7.4/conf.d/redis.ini,/usr/local/etc/php/7.4/conf.d/xdebug.ini
zcm@zcmdeMacBook-Pro conf.d % cat xdebug.inizend_extension=xdebug.soxdebug.remote_enable=Onxdebug.remote_autostart=Onxdebug.remote_host=localhostxdebug.remote_port=9100
以上几条是必配的,然后在phpstorm中xdebug的端口配置为对应的就可以了!