The definitive remote debug and unittest with PHPStorm guide

phpstormPHPStorm is probably the best IDE when it comes to PHP development. During the last few years, a typical development environment shifted from simple a local LAMP stack to multiple complex environments on virtualized platforms with the help of configuration management tools like puppet, chef and Vagrant. But developing in these virtualized environments isn’t always as obvious as it is when developing on a local system. Take for instance the fact that you are editing your files locally, but your virtual machines are sharing these files. Are your files getting updated correctly in your IDE? Are you running your unit tests directly from the IDE, and if so, are they running locally, or inside your virtual environment? When commit something in your version control system – like git – is this done through your local version of git, or the version of git running on the virtual machine? And how about debugging? This multi-part guide will try and set up your systems in such a way that EVERYTHING you need to do when it comes to development gets explained so you can set your system up correctly, once and for all. Meet the “definitive remote debugging and unittest with PHPStorm guide”.

Even though PHPStorm always had many different ways of editing, syncing and deploying your scripts, it was not until PHPStorm 7 that we finally have an IDE that can work fully on a virtualized remote system. In the next couple of blog posts I will try and give you a tour on how to set up your systems so they actually work.

  1. Short introduction on my environment
  2. Autocompletion on PHPUnit files and assertions
  3. Debugging your web application
  4. Remote PHPUnit testing
  5. Remote code coverage
  6. Debugging your command line applications
  7. Debugging your PHPUnit tests


Does the guide work for you? Did it not? Tell us and we try and see if we can improve it for others as well! We love to find new and better ways to do things, and you might have better ways of achieving the same goal as we do.. Tell us and we will try and implement!


Now, it’s time for a short introduction about my environment.


Joshua Thijssen is a freelance consultant, developer and trainer. He is the author of the book "Mastering the SPL library" and speaks at both national and international conferences. His daily work consists of maintaining code bases, working on different projects and helping other to achieve higher standards in both coding and thinking. Find him on twitter at @JayTaph, or read his personal blog at

Dutch Web Alliance