1.服务器上安装xdebug,参考https://xdebug.org/wizard.php 2.添加server上面php.ini配置 其中xdebug.remote_host 是本地IDE的ip xdebug.idekey 要和后面IDE中的配置一致 xdebug.remote_handler=dbgp 代理模式 3.phpstorm配置 代理配置:IDE key 和服务器上面php.ini一致 4.debug配置