运行环境: PHPSTORM版本 : 8.0.1php
PHP版本 : 5.6.2web
xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dllchrome
ps : php版本和xdebug版本必定要相对应 下载地址:http://xdebug.org/download.php浏览器
1. PHP安装xdebug扩展 php.ini的配置,下面的配置仅供参考,路径要换成本身的!phpstorm
[xdebug]ide
zend_extension=”D:\wamp\php-5.6.2-x64\ext\php_xdebug-2.2.5-5.6-vc11-x86_64.dll” svn
xdebug.remote_enable = On网站
xdebug.remote_handler = dbgpdebug
xdebug.remote_host= localhost3d
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 Files\SlikSvn\bin\svn.exe"
5.按F7为单行调试 F8为跳过调试 F9为退出调试
若是出现waiting for incoming connection with ide key 这种状况的 你就多下载几个对应版本的xdebug 总有一个是合适的