I recently started a little project in Laravel 5.5. I updated my Homestead box to the latest version.
While writing a test, I came across a segfault if I spelt an assertion method incorrectly, and I created an issue on the github repo which can be found at https://github.com/laravel/framework/issues/20925
The issue has been closed now, as rightfully, it was my mistake (asertPushedOn()
instead of assertPushedOn()
).
However I've recently come across another segfault, again, it was my error (incorrectly named relationship when trying to eagerload), but the problem is, this never happened prior to 5.5. Now, it seems when I mess something up, I'm randomly getting segfaults. I cant find anything to help debug them in the logs (Laravel logfile or nginx error log.
The only error message I get is Segmentation fault (core dumped)
which doesn't tell me anything.
On the issue report, it mentioned xdebug dumps out the error. I had a google for laravel homestead xdebug
but could only find resources for phpstorm (I'm a sublime user).
TL;DR:
1) In Laravel 5.5 with an updated homestead box, I'm getting php segfaults now if I mess up somewhere. Is this a change in 5.5 / homestead?
2) How can I enable xdebug (will this actually help debug segfaults)?
3) If xdebug isn't the answer, how can I stop getting, or get more default debug info from segfaults?
As mentioned in the issue I created, I don't know much about segfaults.
If you need any further information, please let me know
EDIT
I managed to enable xdebug with:
sudo phpenmod xdebug
sudo service nginx restart
php -m
But I've been unable to reproduce the segfault (with and without xdebug enabled), which makes segfaults all the more confusing for me.