-
-
Notifications
You must be signed in to change notification settings - Fork 645
Support Drush and xdebug inside DrupalVM #1171
Comments
Also @mirsoftacquia #716 (comment). Also earlier feature request #112 |
I'm able to test drush & migrate in d8 with xdebug right now inside the VM. You just have to setup things inside the VM to send its xdebug stuff to outside so PHPStorm can catch things. |
…nt variables over SSH
…nt variables over SSH
@japerry does the above PR solve it? any chance you could provide an example on how to use it? Or some docs would be greatly appreciated. |
Oh haha, I just read this comment after I made an almost identical comment in the PR. @japerry ^^ |
Ops, forgot to mention it was WIP. Or @mirsoftacquia, any chance you could provide a good example we could add to the docs? |
As I understand we can load XDebug on demand with this (I use vim and haven't set up an IDE so can't test this right now though). export PHP_OPTIONS="-d xdebug.profiler_enable=1" and then xdebug will be enabled in the CLI whenever you (or your IDE) SSH into Drupal VM. Tested that the following scenario works: PHP_OPTIONS="-d xdebug.profiler_enable=1" drush @drupalvm.drupalvm.dev php-eval 'echo file_get_contents(xdebug_get_profiler_filename());' while the following does not: drush @drupalvm.drupalvm.dev php-eval 'echo file_get_contents(xdebug_get_profiler_filename());' To get it working I also need to add
Pretty cool tbh. @MKorostoff #1001 you might be interested too. Unrelated but this also made me recall this comment
Which we could simply disable by setting the following environment variable for the site install task |
…nt variables over SSH
One thing I had to do to get this working was set the remote_host to |
…nt variables over SSH
Issue #1171: Allow client to pass PHP and XDEBUG environemnt variables over SSH
This type of scenario is now fixed but I also believe it works out of the box thanks to dd60793. For enabling XDebug on a per request basis with drush you can check the example in the docs http://docs.drupalvm.com/en/latest/extras/xdebug/#xdebug-over-sshdrush. Note: The example in the docs isn't in a stable release yet. |
…nt variables over SSH
Issue Type
Your Environment
Vagrant 1.9.1
VirtualBox 5.1.4r110228
ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides
Your OS
Summary
Drush+xdebug is a powerful tool for stepping through code that isn't available via the UI, with migrate being the biggest example.
DrupalVM is almost capable of allowing for this, however it needs to accept the following three environment variables:
# Allow client to pass locale environment variables AcceptEnv PHP_IDE_CONFIG AcceptEnv XDEBUG_CONFIG AcceptEnv PHP_OPTIONS
The text was updated successfully, but these errors were encountered: