New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling Xdebug causes drush to hang on subcommand #1534

bradjones1 opened this Issue Aug 4, 2015 · 4 comments


None yet
4 participants

bradjones1 commented Aug 4, 2015

Steps to reproduce:

Using an IDE (PhpStorm), enable the Xdebug listener but do not set a breakpoint.
In your development environment (I'm using Drupal 8), already established to work on a single Drush request throwing breakpoints (e.g., early in drush.php), run a command that spawns a subcommand, e.g., drush updb.

Drush will hang after "No database updates required," while it is running a cache-rebuild. PhpStorm does not stop at any breakpoints.

Turn off the IDE's Xdebug listener and the command will complete as expected.

Or, remove the XDEBUG_CONFIG variable from the environment and drush will complete as expected (since Xdebug is effectively turned off.)

The only possibly-related issue I can find on something like this is #1378, but that seems rather different.


This comment has been minimized.


weitzman commented Aug 4, 2015

Increase the number max simultaneous connections in PHPStorm Prefs (Search for Debug in prefs search bar).

@weitzman weitzman closed this Aug 4, 2015


This comment has been minimized.


bradjones1 commented Aug 4, 2015



This comment has been minimized.


ElijahLynn commented Mar 1, 2016

I just came across this too but it took me a while to figure out, thanks for confirming this needs to be bumped up.


This comment has been minimized.

kiwimind commented Aug 9, 2017

Without meaning to necro this thread, thought I'd drop in something else that I learned while trying to get drush to play nicely with Xdebug while the listener was enabled in PHPStorm.

Increasing the number of simultaneous connections did not solve this for me (although I've left them increased for now). What did it for me was disabling both Force break at first line when on path mapping specified and Force break at first line when a script is outside the project from the Xdebug section of the Debug config.

Hope this helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment