1.先选择版本
2.打开当前版本的php.ini 搜索xdebug (看到的应该差不多是这样的)
3.开启zend_extension 对应的路径是你当前php版本下的php_xdebug.dll(如果没有则要下载一般在)
4.如果没有就去下载一个对应版本的https://xdebug.org/download.php(我这下载那个用不了,自带那个反而能用)
5.然后在php.ini xdebug那栏下面添加
xdebug.remote_handler=dbgp
xdebug.remote_enable = On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.auto_trace = On
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
;xdebug.trace_output_dir =“C:\phpStudy\tmp\xdebug”
xdebug.show_local_vars = On
xdebug.profiler_enable = On
;xdebug.profiler_output_dir =“C:\phpStudy\tmp\xdebug”
xdebug.trace_enable_trigger =On
6.重启phpstudy ,打印phpinfo(),查看是否有xdebug 出现
则成功开启
7.在phpstorm打开debug 打上断点则完成
8.刷新页面出现这个则成功