PhpStorm2025.1 安装 debug – Postman 调用的详细教程

2025-05-27 0 41

一. 准备

1.1 下载 xdebug

我本地用的是 phpstudy 的集成环境, php 版本是 7.2.10

在 xdebug 下载地址(https://xdebug.org/download/historical)找到合适的版本(这边包含历史版本),我选的是 php 7.2 vc15 (32 bit)

1.2 配置 php

将下载好的文件放入 php 下的 ext 文件夹内,以我本机为例 (e:castlephpstudyphptutorialphpphp-7.2.1-ntsext)

php.ini 拉到最下面,加上以下内容

  1. [XDebug]
  2. xdebug.profiler_output_dir="E:\\Castle\\phpStudy\\PHPTutorial\\tmp\\xdebug"
  3. xdebug.trace_output_dir="E:\\Castle\\phpStudy\\PHPTutorial\\tmp\\xdebug"
  4. zend_extension="E:\\Castle\\phpStudy\\PHPTutorial\\php\\php-7.2.1-nts\\ext\\php_xdebug-2.9.5-7.2-vc15-nts.dll"
  5. xdebug.remote_enable=1
  6. xdebug.remote_handler=dbgp
  7. xdebug.remote_host="localhost"
  8. xdebug.remote_mode=req
  9. xdebug.remote_port=9010
  10. xdebug.idekey="PHPSTORM"
  11. xdebug.remote_autostart=1

1.3 打印phpinfo() 页面

看 xdebug 是不是已经有了,如果没有一般都是下载的版本错了

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

二. phpstorm 配置

2.1 settings 处的配置

2.1.1 从 file > settings,输入 php,红框处的就是我们需要配置的地方

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

2.1.2 先配置一下 php 的版本(我本地用的 7.2,)

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

2.1.3 debug port 这边的值用之前在 php.ini 里面新增的值,其它不动

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

2.1.4 dbgp proxy 这边的值也使用之前 php.ini 里面新增的

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

2.1.5 配置 servers (到这边为止设置里面就配置完毕了)

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

2.2 新增 debug 配置

2.2.1从箭头处进入,选择php web page 新建

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

2.2.2 配置完毕

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

三. 举例说明

3.1在前面打上断点,正常就会出现如下内容啦

PhpStorm2020.1 安装 debug - Postman 调用的详细教程

3.2 postman 请求 (基本没有区别,唯一要注意的就是 2.1.5 配置 servers 这边的 host 配置了,你的请求域名是什么就填什么就可以了)

总结

到此这篇关于phpstorm2020.1 安装 debug – postman 调用的文章就介绍到这了,更多相关phpstorm2020.1 安装 debug内容请搜索快网idc以前的文章或继续浏览下面的相关文章希望大家以后多多支持快网idc!

原文链接:https://blog.csdn.net/u014456639/article/details/105896458

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 建站教程 PhpStorm2025.1 安装 debug – Postman 调用的详细教程 https://www.kuaiidc.com/70759.html

相关文章

发表评论
暂无评论