phpstorm配置debug

下载对应PHP版本的debug文件https://www.cnblogs.com/niejunlei/p/5318304.html

配置步骤

步骤一
phpstorm配置debug

步骤二

phpstorm配置debug

步骤三

phpstorm配置debug

步骤四
phpstorm配置debug

步骤五:php.ini文件追加以下内容

xdebug.max_nesting_level=100;最大递归数
xdebug.overload_var_dump = On
;重写var_dump(),当这个参数被设置为1时,即使捕捉到异常,xdebug仍将强制执行异常跟踪当一个异常出现时
xdebug.collect_return=on
zend_extension = “D:\phpStudy\PHPTutorial\php\php-7.2.1-nts\ext\php_xdebug-2.6.0-7.2-vc15-nts.dll”;debug文件的目录
xdebug.auto_trace = Off
xdebug.show_exception_trace = Off
xdebug.remote_autostart = On;自动监听,不用下载相关插件
xdebug.remote_enable = On
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
xdebug.profiler_enable = Off
xdebug.remote_host=localhost
xdebug.remote_port=9000 ;debug监听端口
xdebug.idekey=PHPSTORM

步骤六
phpstorm配置debug

打开页面触发相应的方法,进入debug模式

phpstorm配置debug