phpstrom 配置xdebug

运行环境: PHPSTORM版本 : 8.0.1

PHP版本 : 5.6.2

xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dll

ps : php版本和xdebug版本一定要相对应 下载地址:http://xdebug.org/download.php

1. PHP安装xdebug扩展 php.ini的配置,下面的配置仅供参考,路径要换成自己的!

[xdebug]

zend_extension=”D:wampphp-5.6.2-x64extphp_xdebug-2.2.5-5.6-vc11-x86_64.dll” 

xdebug.remote_enable = On

xdebug.remote_handler = dbgp

xdebug.remote_host= localhost

xdebug.remote_port = 9000

xdebug.idekey = PHPSTORM

ps : remote_handler 、remote_host、remote_port 这些都有默认值,但还是建议设置下,至少知道要设置这些参数~ 查看phpinfo~

2.PHPSTORM设置

 1.首先检查phpstorm的xdebug配置 这里的debug port要和php.ini里面的xdebug.remote_port相一致!默认是9000,如果9000端口被占用的话,可以改成其他端口。

2. 设置debug.添加本地的 web server

浏览器我选的火狐,chrome 有时候还需要配置一些东西

3.开始调试 双击代码头部行数的地方,选中配置的debug, 按旁边的臭虫 按钮

4.如果出现提示 Errors found while svn working copies detection. Fix it

到网站https://sliksvn.com/pub/下载给你svn版本差不多对应的版本 安装到指定目录 

然后配置 file->settings->Version Contorl->subversion->with conmand line client set to "C:Program FilesSlikSvninsvn.exe"

5.按F7为单行调试 F8为跳过调试 F9为退出调试

如果出现waiting for incoming connection with ide key 这种情况的 你就多下载几个对应版本的xdebug 总有一个是合适的

原文地址:https://www.cnblogs.com/zuochuang/p/4975139.html