1、检测本地php环境是否安装了Xdebu
在本地输出phpinfo();搜索(Ctrl+f)Xdebug
如下图:
如果没有安装,安装操作Xdebug如下:
将phpinfo();的信息全部输入网址:http://xdebug.org/wizard.php中的框,得到适配的xdebug版本,按照下图中操作进行。
下载文件:
2.安装Xdebug并配置本地的php.ini文件
[xdebug]
;zend_extension的值根据自己的本地环境填写
zend_extension = "F:/Software/wamp64/bin/php/php7.0.0/zend_ext/php_xdebug-2.6.0-7.0-vc14-x86_64.dll"
;允许远程IDE调试
xdebug.remote_enable = On
;远程IDE所在HOST和PORT
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
;可以是任意Key,这里设定为PHPSTORM
xdebug.idekey = PHPSTORM
;开启远程调试自动启动
xdebug.remote_autostart = Off
;开启自动跟踪
xdebug.auto_trace = On
xdebug.trace_output_dir="F:\Software\wamp64\xdebug"
;把执行情况的分析文件写入到指定目录中
xdebug.profiler_enable=on
xdebug.profiler_output_dir="F:\Software\wamp64\xdebug"
3、配置phpstorm
1)第一步
2)第二步
3)第三步