1.配置php.ini,
[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
2.配置phpstorm,File->Settings->PHP->Servers->+,然后填入name:localhost,Host:localhost,Port80->apply->ok,
File->Settings->PHP->Debug->DBGP Proxy,填入IDE key:phpstorm,host:localhost,Port:9001->apply->ok
3.到http://www.jetbrains.com/phpstorm/marklets/的xdebug写入IDE key:PHPSTORM,点击Generate,然后把下面的
拖到浏览器保存为书签
4.在phpstorm里的一个文件设置断点,点击电话按钮监听,在浏览器Start Debug,F5刷新页面即可,如图: