This screencast shows you how to debug a PHP application with Xdebug in both PHPStorm and Sublime.
To follow along you will need the following prerequisites:
You will also need PHPStorm or Sublime Text. If you choose to debug in Sublime you will need to have Package Control installed, then install the Xdebug package
Related reading on Sitepoint