win10 Postman 无法打开 Could not open Postman

win10 Postman 无法打开 Could not open Postman,第1张

安装完 Postman 打开后会出现下列情况

先打开任务管理器,结束 Postman 进程

然后删除 Postman 本地数据

C:\Users\Administrator\AppData\Roaming\Postman

完成后再打开就可以了

1. 查看是否安装xdebug和其版本

新建测试页面:<?php phpinfo()?>,在页面中搜索:xdebug,可以查询是否安装及其版本

2. 安装xdebug

把 phpinfo()的html页面内容全部拷贝输入到  https://xdebug.org/wizard  中,自动检测需要安装的xdebug版本,此网址也可以检测你安没安装xdebug和其版本,例如

Download  php_xdebug- XXXXX.dll

Move the downloaded file to C:\xampp\php\ext, and rename it to php_xdebug.dll

Update C:\xampp\php\php.ini and add the line:

zend_extension = xdebug

Restart the Apache Webserver

3. 配置phpstorm

在Settings里面找到 PHP ->Debug 

一定要找到 1. Install Xdebug or Zend.........Validate  (点击它),d出对话框后点击  Validate,如果全是绿色钩子,恭喜你,Xdebug安装配置成功。(这是最关键步骤)

如果不是,例如提示将:xdebug.mode = debug  加在 php.ini 里。我的加在 zend_extension = xdebug 后面。查阅很多网页,他们都加了好多行,在xdebug3里,行不通,浪费我半天时间。

Debug port:9000,9003  其余都勾选。

Xdebug2的端口是9000;Xdebug3的端口是9003

不用配置DBGp Proxy

添加  PHP -> Servers

添加 Add Configuration...  添加PHP Web Page

4. 用Postman断点调试 POST 接口

在Postmen发送请求时,添加 Headers :

KEY : COOKIE

VALUE : XDEBUG_SESSION=PHPSTORM

5. 用浏览器get请求,不停在断点处解决办法

用Postman发送get请求,添加 Headers :........

在浏览器chrome里安装Xdebug helper插件,点击debug变绿即可。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/tougao/6823087.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-28
下一篇 2023-03-28

发表评论

登录后才能评论

评论列表(0条)

保存