一、接口調試
1,配置dicker裏面的php.ini,有可能docker裏的針對xdebug的單獨ini,例如/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
#生產環境嚴禁使用xdebug
xdebug.remote_enable=1
#如果環境是mac+docker,那宿主機IP可以使用docker.for.mac.localhost來代表
#其他情況填寫本機IP地址(本機局域網IP)
xdebug.remote_host=docker.for.mac.localhost
#xdebug默認的端口是9000,與php-fpm默認的9000衝突,要避免衝突
xdebug.remote_port=9012
#IDEKEY可以自定義,我們使用PHPSTORM
xdebug.idekey=PHPSTORM
2,配置phpstorm,設置Xdebug端口
#設置路徑
PhpStorm-->Preferences-->Languages & Frameworks-->PHP-->Debug
3,配置phpstorm,設置Servers
#設置路徑
PhpStorm-->Preferences-->Languages & Frameworks-->PHP--