首先安装xdebug扩展:https://xdebug.org/download.php
如下:
下载后,将扩展放到php扩展文件里面:
如:D:\phpStudy\PHPTutorial\php\php-7.1.13-nts\ext
然后在php.ini配置文件中添加如下:
[xdebug]
zend_extension="D:\phpStudy\PHPTutorial\php\php-7.1.13-nts\ext\php_xdebug-2.7.2-7.1-vc14-nts.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
;xdebug.remote_port=9000
xdebug.profiler_enable=on
最后重启服务器。
phpstrom中开启debug调试(记得:是在入口文件中开启debug调试)
在测试文件中打断点,然后可以看到效果了