当前位置: 首页 > 后端技术 > PHP

使用xdebug+phpstorm+(chrome-postman)调试php

时间:2023-03-29 16:47:33 PHP

1。基本信息:window7php:7.1.3phpstorm:2017.1xdebug:2.5.1postmanpostman拦截器chromexdebughelper2。安装xdebug1)下载xdebug扩展https://xdebug.org/2)配置php.ini[xdebug]zend_extension="E:\phpstudy\php\php-7.1.3-nts\ext\php_xdebug-2.5.1-7.1-vc14-nts-x86_64.dll"xdebug.remote_enable=1xdebug.remote_handler=dbgpxdebug.remote_mode=reqxdebug.remote_host=localhostxdebug.remote_port=9000xdebug.idekey="PHPSTORM"3.配置phpstorm1)新建一个php服务器(注意:如果不使用路径映射,只能调试framework入口文件)2)debugConfiguration4.Chrome插件xdebughelper地址:https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?utm_source=chrome-app-launcher-info-dialog5.xdebughelper配置6.测试chrome1)打开Editor监控2)3)浏览器访问项目4)打开phpstorm,可以看到调试控制台已经打开5)断点6)转到下一个断点,可以看到效果7)使用postman调试api安装插件使用postman请求进入断点7.第一次写文章后,我发现写文章有很多好处。虽然网上能收到很多教程,但是写的跟配置成功完全不一样。文章如有错误,欢迎大家指正。指出。