Used to be sublime+local webserver way in writing and debugging, but recently more and more feel bitter hand, or with the IDE to adjust the convenience, so the next xdebug, record a memo.
Phpstorm basically nothing to match, directly in the settings under the language to select PHP, and then choose a good PHP directory, it will automatically detect the interpreter and debugger and its version, of course, the debugger should be configured first.
Configuration xdebug:
First download good php_xdebug-2.2.5-5.6-vc11-x86_64.dll, this will match your phpstorm version, mine is Phpstorm 8.02.
Then add it in the php.ini file after you've placed it:
[Xdebug]
zend_extension= "D:/php5.6/ext/php_xdebug-2.3.1-5.6-vc11-x86_64.dll"//change this to your own xdebug path
Xdebug.remote_enable=on
Xdebug.remote_handle=dbgp
Xdebug.remot_host=localhost
xdbug.remote_port=9000
Xdebug.idekey=phpstrom
Finally, the actual debugging, shift+f9 the next breakpoint.
Phpstorm Configuration Xdebug