phpstrom使用xdebug配置方法

  1 到 http://xdebug.org/download.php下载xdebug。注意找到自己对应的php版本。或者可以通过 http://xdebug.org/wizard.php页面,将phpinfo的信息复制进去,点最下面的分析。它会告诉你要下载哪个版本,然后如何配置。

  2.打开php.ini添加以下语句

  

复制代码 代码如下:

  [XDEBUG]

  zend_extension = "D:\Program Files (x86)\php5\ext\php_xdebug.dll"

  xdebug.remote_enable=on

  ; 此地址为IDE所在IP

  xdebug.remote_host=127.0.0.1

  xdebug.remote_port=9000

  ; 可以是任意Key,这里设定为PHPSTORM

  xdebug.idekey="PhpStorm"

  3.配置IDE

  在Settings里面,选择PHP -> Debug,在xdebug里填入刚才设定的端口,确定即可。

  4.配置浏览器

  Chrome上安装 Xdebug helper 。设置Key等于php.ini所设定的key

  5.调试过程:在PhpStorm的run菜单最下面,选择 Start Listen PHP Debug Connections 开启监听。当浏览器访问到断点的地方,就会PhpStorm就会自动响应。