Phpstorm使用xdebug断点调试

作者 : admin 本文共362个字,预计阅读时间需要1分钟 发布时间: 2024-06-7 共2人阅读

一、目标

1、在浏览器地址栏里操作页面访问接口时,可以在项目代码对应入口处断点拦截调试;
2、在postman调用接口时,可以在项目代码对应入口处断点拦截调试;

phpstorm版本:PhpStorm 2024.1.2

二、具体操作

1、安装xdebug
[Xdebug]
zend_extension = php_xdebug.dll
xdebug.mode = debug
xdebug.remote_enable = On
xdebug.remote_host = localhost
xdebug.remote_port = 9003
xdebug.idekey = phpstorm
2、Phpstorm配置端口号

Phpstorm使用xdebug断点调试插图

3、配置web调式
1)浏览器安装xdebug扩展

Phpstorm使用xdebug断点调试插图(1)

2)Phpstorm添加配置

Phpstorm使用xdebug断点调试插图(2)
Phpstorm使用xdebug断点调试插图(3)

Phpstorm使用xdebug断点调试插图(4)
Phpstorm使用xdebug断点调试插图(5)

4、配置postman调式
1)Phpstorm添加配置

Phpstorm使用xdebug断点调试插图(6)

2)postman调用

Phpstorm使用xdebug断点调试插图(7)

本站无任何商业行为
个人在线分享 » Phpstorm使用xdebug断点调试
E-->