3

Windows下 PHPstorm + Xdebug 动态调试环境配置

 2 years ago
source link: https://cyc1e183.github.io/2019/07/15/Windows%E4%B8%8B-PHPstorm-Xdebug-%E5%8A%A8%E6%80%81%E8%B0%83%E8%AF%95%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Windows下 PHPstorm + Xdebug 动态调试环境配置

发表于

2019-07-15 更新于 2020-03-05 分类于 水滴随笔

阅读次数: 51
本文字数: 867 阅读时长 ≈ 1 分钟

配置本地的phpstorm + Xdebug动态环境真的是一个糟心的事,之前一直出问题,现在重新配简单的记录下,本地的php环境是用phpstudy实现,各个版本都默认带有xdebug插件,php.ini中配置调用就好。

0x01 php.ini配置

zend_extension="D:\PhpStudy2018\PHPTutorial\php\php-7.0.12-nts\ext\php_xdebug.dll" //xdebug.dll物理地址
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM

0x02 PHPstorm配置

1)File | Settings | Languages & Frameworks | PHP

配置对应的php版本

接着配置一下PHP.exe的路径和xdebug插件的路径

2)File | Settings | Languages & Frameworks | PHP | Debug

3)File | Settings | Languages & Frameworks | PHP | Debug | DBGp Proxy

4)File | Settings | Languages & Frameworks | PHP | Servers

配置Host信息,也就是web服务信息(Use path mappings也可以点上,有些文件找不到路由关系)

5)Run | Edit Configurations -> Add New Configurations

添加一个PHP Web Page页面,配置好相关的Configuration信息,个人习惯用Chrome

0x03 Chrome插件配置

Chrome浏览器安装 Xdebug helper 插件,IDE key配置成PhpStorm就OK

到这里就都配置完毕了,动调的时候在相关页面下好断点,Chrome的 Xdebug helper 开启debug模式,phpstorm打开监听模式(右上角的小电话)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK