Homestead: Xdebug on the cli

Created on 22 Feb 2017  Â·  6Comments  Â·  Source: laravel/homestead

Should xdebug be enabled on the CLI by default?

I ran into an issue today when I had to generate a code coverage report from a homestead install. It isn't possible due to xdebug not being available.

Perhaps an option in the configuration would be useful or an alias that would link/unlink xdebug for the cli as and when the developers need it.

Most helpful comment

I would rather leave existing behavior as is, and suggest users that need to enable xdebug on the command line to toggle it as needed: sudo phpenmod -s cli xdebug

If you want to enable xdebug on the CLI forever, just add that line to your after.sh script.

All 6 comments

I would rather leave existing behavior as is, and suggest users that need to enable xdebug on the command line to toggle it as needed: sudo phpenmod -s cli xdebug

If you want to enable xdebug on the CLI forever, just add that line to your after.sh script.

Yes, totally agree with @svpernova09

I actually submitted the current behaviour PR for this a while ago, due to xdebug causing massive slow down when using composer.

https://github.com/laravel/settler/pull/78

Oh! haha awesome!

Thanks for taking the time to bring up the issue.

@svpernova09 @jonnywilliamson makes sense – completely agree with not having it enabled by default, especially when it comes to using composer. I had actually resorted to appending a couple of aliases to my after.sh to make things a bit more fluent.

I'll leave them here should anyone else need them.

echo "alias xon='sudo phpenmod -s cli xdebug'" >> /home/vagrant/.profile
echo "alias xoff='sudo phpdismod -s cli xdebug'" >> /home/vagrant/.profile

@svpernova09 done. Cheers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

teleclimber picture teleclimber  Â·  3Comments

leandroruel picture leandroruel  Â·  4Comments

daryn-k picture daryn-k  Â·  5Comments

Quix0r picture Quix0r  Â·  4Comments

pqt picture pqt  Â·  3Comments