phpstorm+XDEBUG的使用

来源:互联网 发布:算法第四版答案pdf 编辑:程序博客网 时间:2024/04/29 04:07

  • PHP安装xdebug扩展

1、下载xdebug扩展,从这里找到你对应的PHP版本,xdebug

2、配置php.ini,如下:

[Xdebug]zend_extension="C:\php54\ext\php_xdebug-2.3.2-5.4-vc9.dll"xdebug.idekey="PhpStorm"xdebug.remote_enable = 1xdebug.remote_host=localhostxdebug.remote_port=9000xdebug.remote_handler=dbgp

  • 配置PhpStorm

1、配置监听端口

2、添加断点

3、启用监听

  • 浏览器启用xdebug

1、chrome上安装xdebug helper

2、配置idekey

3、开启调试模式

调试就简单了,PhpStorm自己会跳出调试窗口显示当前变量。

0 0