0

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?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Amade
  • 3,665
  • 2
  • 26
  • 54
  • That's typical xdebug log -- xdebug saves his activity (debug attempt in your case). Check `xdebug.remote_log` option (your php.ini or whatever) – LazyOne Dec 23 '17 at 13:35
  • My xdebug.remote_log is set to: xdebug.remote_log=~/code/xdebug.log. My projects are under ~/code/PROJECT_NAME, and `-1` files are always created within the root directory of a project. – Amade Dec 24 '17 at 01:08
  • 1
    In such case I have no clue. I may only suggest this: write custom artisan command that will show the xdebug section of `phpinfo()` output (to see all current xdebug settings that are applied to current session) -- maybe it will be shown there... – LazyOne Dec 24 '17 at 10:47
  • Thank you for a good lead! Helped me a lot in finding the answer :) – Amade Dec 24 '17 at 14:28

1 Answers1

0

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.

Amade
  • 3,665
  • 2
  • 26
  • 54