As I have written before, we are big fans of Mark Shust's Docker Configuration for Magento project. Even though we customized the setup a bit for our needs, it comes with a lot of good stuff out of the box, like Xdebug support.
Current situation: I have no local webserver running and just php5-cli (plus a few extensions) installed as most of the development I do will make use of a Vagrant machine. From time to time I develop small tools or libs which I like to debug on the command line. This is an overview how I configured my Ubuntu 14.04 box to handle debugging with Xdebug and phpstorm.