在PHPSTORM中安装调试xdebug

  记录下xdebug的安装过程,防自己忘记了
在phpinfo中查看xdebug插件是否开启,我的安装环境中php插件中已经自带了xdebug插件,不用去下载直接使用

没有开启的话需要在php.ini中配置xdebug

[xdebug]
zend_extension="C:\xampp\php\ext\php_xdebug.dll"

xdebug.profiler_enable = 1
xdebug.auto_trace = 1;
xdebug.show_exception_trace = 1
;这里必须设置为0,为了能使用浏览器插件 xdebug helper配合调试
xdebug.remote_autostart = 0 ;
xdebug.remote_enable = 1 ;
;这里是开启远程调试
xdebug.remote_handler = "dbgp" ;
;远程调试的host
xdebug.remote_host = "127.0.0.1" ;
;远程调试的端口号
xdebug.remote_port = 9000 ;
;远程调试的对应 key
xdebug.idekey="PHPSTORM" ;

接下来需要在phpstorm中添加服务来支持xdebug

z.cn是使用postman调试api产生的配置

 

猜你喜欢

转载自www.cnblogs.com/yukikaze/p/10030263.html