php- xdebug

1. php 安装xdebug扩展

        1.1 扩展配置

xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9067
xdebug.remote_handler=dbgp

 

2. chrome浏览器安装xdebug插件:

  chrome-xdebug插件下载

 

3. phpstorm 配置

    3.1 File | Settings | Languages & Frameworks | PHP | Debug  端口号改成9067 并保存。

     3.2  php- xdebug_第1张图片(图1)

点击图1 Validate,并通过

php- xdebug_第2张图片(图2)

 

Path to create validatation script 是项目入口文件位置。

 

3.3 点击StartListening

 

4.    创建webPage (也叫php web application  )php- xdebug_第3张图片

 

          

5.   写相关测试方法,并打上断点,  启用debug

  

 

     

     

 

 

你可能感兴趣的:(php)