phpstrom使用xdebug配置方法_php技巧

WBOY
Release: 2016-05-17 08:52:24
Original
1753 people have browsed it

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就会自动响应。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template