1>XAMPP停止apache服务;
2>在安装目录下找到php.ini,类似于D:\xampp\php\php.ini,打开并找到被注释掉的项目并按如下设置:
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"(根据实际情况确定)
xdebug.remote_enable =1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
2>在安装目录下找到php.ini,类似于D:\xampp\php\php.ini,打开并找到被注释掉的项目并按如下设置:
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"(根据实际情况确定)
xdebug.remote_enable =1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
xdebug.remote_port = 9000
xdebug.idekey="PHPSTORM"
3>打开phpStorm,
-进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填localhost,host填localhost,port填
80,debugger选XDebug
-进入File>Settings>PHP>Debug,看到XDebug选项卡,port填9000,其他默认
-进入File>Settings>PHP>Debug>DBGp Proxy,IDE key 填 phpStorm,host 填localhost,port 填80
-点OK退出设置。