运行环境:php
PHPSTORM版本 : 8.0.1web
PHP版本 : 5.6.2phpstorm
xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dllide
ps : php版本和xdebug版本必定要相对应spa
1. PHP安装xdebug扩展
.net
php.ini的配置,下面的配置仅供参考,路径要换成本身的!debug
[xdebug]调试
zend_extension="D:\wamp\php-5.6.2-x64\ext\php_xdebug-2.2.5-5.6-vc11-x86_64.dll"orm
xdebug.remote_enable = Onserver
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设置
楼主之前一直用zendstudio,刚开始用phpstorm很是蛋疼,用了一段时间后发现还挺好用的~
1.首先检查phpstorm的xdebug配置
这里的debug port要和php.ini里面的xdebug.remote_port相一致!默认是9000,若是9000端口被占用的话,能够改为其余端口。
2. 设置debug.
添加本地的 web server~
www.51open.pcom 是我本地的 web server~ ~
3.开始调试
打好第一个断点,shift + F9就能够了
打好第一个断点,选中配置的debug, 按旁边的臭虫 按钮