phpstrom 开启debug调试模式

首先安装xdebug扩展:https://xdebug.org/download.php

如下:

phpstrom 开启debug调试模式_第1张图片

下载后,将扩展放到php扩展文件里面:

如:D:\phpStudy\PHPTutorial\php\php-7.1.13-nts\ext

phpstrom 开启debug调试模式_第2张图片

然后在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调试模式_第3张图片

最后重启服务器。

phpstrom中开启debug调试(记得:是在入口文件中开启debug调试)

phpstrom 开启debug调试模式_第4张图片

在测试文件中打断点,然后可以看到效果了

phpstrom 开启debug调试模式_第5张图片

你可能感兴趣的:(php)