1.setting-php-Debug xdebug的配置
这里端口填xdebug里面配置的端口
2.setting-php-Debug-DBgp Proxy的配置,和xdebug.ini一致
3.File-Settings-PHP-Servers,配置servers
在use path mappings 上打勾,然后选择自己的项目目录。
再在absolute paht on the server 按虚拟机中的文件目录绝对路径配置
这样就可以用debug了
更新一下,最近遇到了一次配置好,但是还是不能用的情况,原因是运行docker虚拟机没办法ping到我本来,根本问题是防火墙,关了防火墙就好了。