Search code examples
phplaravelxdebuglaravel-artisan

"-1" file created in app root directory when running php artisan


I am running Laravel on Homestead, and whenever I run any php artisan XXX command, the file named -1 is created in the root directory of the app.

Contents of the file are similar to these ones:

Log opened at 2017-12-22 13:54:00
I: Connecting to configured address/port: 10.0.2.2:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-12-22 13:54:00

I am 99% sure it is related some changes I made in my failed attempts to make XDebug breakpoints work with artisan commands. I have exported some shell variables, as recommended in this answer, but when I run export -p I don't see any of them.

Did anyone have a similar issue? What setting can be causing such behavior?


Solution

  • Following the suggestion of LazyOne, I found the answer:

    It seems that paths in .ini file have to be absolute. So instead of:

    xdebug.remote_log=~/code/xdebug.log

    I had to set it to:

    xdebug.remote_log=/home/vagrant/code/xdebug.log

    and now it works as supposed to.