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

1.基本信息:

window 7
php:7.1.3
phpstorm:2017.1
xdebug:2.5.1
postman
postman interceptor
chrome
xdebug helper

2.安装xdebug

 1) 下载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=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="PHPSTORM"

3.配置phpstorm

1)新建php server

 (注:如果不使用路径映射,将只能调试框架入口文件)
2)debug 配置    

4.chrome插件xdebug helper

地址:https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?utm_source=chrome-app-launcher-info-dialog

5.xdebug helper 配置

6.测试chrome

1)开启编辑器监听


2)

3)浏览器访问项目

4)打开phpstorm,可以看到debug控制台已经打开

5)断点

6) 调到下一个断点,可以看到效果了

7)使用postman调试api

安装插件


使用postman请求

进入断点

7.结束

第一次写文章,发现写文章有蛮多优点的,虽然网上能收到很多教程,但是写出来和配置成功完全不一样,
文中有什么错误的地方欢迎大家指出。



你可能感兴趣的:(xdebug,调试,postman,phpstorm,php)