gwomacks / php-debug

Atom Text Editor package for PHP debugging
MIT License
119 stars 31 forks source link

Cannot use Drush with XDebug and atom for debugging #250

Closed ihebattia closed 6 years ago

ihebattia commented 6 years ago

Hi, I was searching for a solution about running Drush with XDebug and atom. When I add breakpoints to a simple php test it works perfectly, however when I add breakpoints to a Drupal drush function it does not work and ignores the breakpoints.

Has anyone an idea what the problem is ?

slifin commented 6 years ago

Depending on your setup, drush could be using CLI PHP instead of the non CLI version your web server likely uses, check the CLI version for xdebug with PHP -m | grep xdebug

chrisolof commented 6 years ago

Same here. When I run a drush command I see "connected" in the debugging panel, but no breakpoints are ever hit. Sounds like folks using PHPStorm often increase a "Max. simultaneous connections setting" to 2 or greater to get drush working with the XDebug integration there. I don't see such a setting in php-debug.

Wondering if #7 may be that setting...

cchamplin commented 6 years ago

The default listener in 0.3.0 was changed to all addresses, additionally we now support multiple debug sessions. I'm going to close this, please reopen if it's still an issue.

chrisolof commented 6 years ago

Just wanted to followup and confirm that the current version of php-debug does work with drush now. Thanks for bringing in support!