php调试工具 xdebug的安装 和phpstorm的配置

1.下载xdebug,找到php对应的版本,php5.3以前的的后要接_ts,如zend_extension_ts

http://www.xdebug.org/download.php

在c盘windows下找到php.ini,再后加入

zend_extension_ts="E:/php5/ext/php_xdebug-2.2.3-5.2-vc9.dll"//这里是上一步下载的动态链接库的存放路径 建议使用绝对路径
xdebug.remote_enable=1//是否允许远程终端 这里标示开启
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000//这里表示服务器的监听端口
xdebug.idekey="PHPSTORM";//这里是调试器的关键字 在Chrome以及FireFox中插件配置的
 
cd命令行里查看是否安装成功php.exe -m
 
2. File>Settings>PHP 选择Interpreter   

PHP home:选择自行安装的

PHP Debugger:下拉框中选择 Xdebug 

 

3.进入File>Settings>PHP>Debug 

 Debug port:

这里设置为9000 

与服务器端配置相同 

xdebug.remote_port=9000 

 

4.进入File>Setting>PHP>Debug>DBGp Proxy  

IDE key: PHPSTORM 

Host:localhost 

Port:80 

PHPStorm

5. chrome下载

xdebug helper

 
原文地址:https://www.cnblogs.com/1haojia/p/3738564.html