
- PHPSTORM REMOTE DEBUGGING HOW TO
- PHPSTORM REMOTE DEBUGGING CODE
I had an issue where breakpoints weren't working that I tracked down to a lower case "s" in "Sites" that I mistakenly set up in my Apache virtual host for the site ("/Users/michael/sites" instead of "/Users/michael/Sites").
Case-senstitivity in paths - on my machine, the path to my "Sites" directory is "/Users/michael/Sites". If it doesn't work, here are a couple of things you can take a look at: The deployment server mappings were left at their default values: TroubleshootingĪt this point, you should be able to enable the PhpStorm debugging listener, go into your browser, turn debugging on (either via a browser extension or bookmarkletĪnd happily debug away. While PhpStorm supports remote debugging, for my situation, the "In place" deployment type was sufficient. Setting up a deployment serverĬonfiguring a deployment server is one of the key things you need to do in order to debug in PhpStorm. When debugging automated tests using the run-tests.sh script, it is crucial that PhpStorm's "Max Simultaneous Connections" for PHP Debugging is set to a sufficiently large value. For my situation, where I wanted to debug a local site, the following settings are key: Max. JetBrains (the makers behind PhpStorm) provide decent online documentation - I found this post and this screencast especially helpful. See Angus Max's post on for more details. Be sure to source ~/.bash_profile after you make the change (or restart your terminal session). If you're using another command line interface, you'll need to make a similar addition. If you want to be able to debug Drush commands, you'll need to add the following to your. PHPSTORM REMOTE DEBUGGING HOW TO
Here's some documentation demonstrating how to confirm you're good-to-go.
I figured out which one by doing a drush status and seeing which PHP configuration it was using. To make it work from the command line (Drush), I also had to add this stuff to another php.ini file. Zend_extension="/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
It was easy enough to enable - I added the following to my php.ini file (note that the path will be dependent on the version of PHP you'd like to use): While there are plenty of resources online demonstrating how to set up the debugger, I found that I needed to do a combination of things to make it happen Enable xDebugĭepending on your *AMP stack, xDebug may or may not be enabled by default. My main motivation for making the switch was the ability to have a integrated debugger - both when running Drupal in a web browser and via Drush.
PHPSTORM REMOTE DEBUGGING CODE
I recently made the switch from another (several) code editors to PhpStorm based on the recommendations of several members of the Drupal community - not to mention all the postive things I've heard about it on IRC and various other places.