VVV: XDebug could not open the remote debug file '/tmp/xdebug-remote.log'.

I get this error on every page load after running xdebug_on. It also shows up when running any wp-cli commands.

XDebug could not open the remote debug file '/tmp/xdebug-remote.log'.

I can temporarily fix it by running:

sudo chmod 666 /tmp/xdebug-remote.log

But the next time I reload vagrant and re-enable xdebug, it’s back how it was before. XDebug is working fine, it’s just this annoying error message.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

On Ubuntu head over to the php mods folder: cd /etc/php/7.0/mods-available

Edit the xdebug config file: sudoedit xdebug.ini

The first line in the file should be: xdebug.remote_log = /var/log/xdebug/xdebug.log

Edit it and tell the system to put the xdebug.log in the folder shared by your host and vm. I’m running vmware fusion on my mac and I’ve set “/mnt/hgfs/” as my host/vm shared folder. I edited my xdebug.ini to have it store the xdebug.log file in a subfolder of my shared folder. Important! You need to make sure the folder exists already or create it.

xdebug.remote_log = /mnt/hgfs/html/apache_logs/xdebug.log

This solves 2 problems: 1) It will get rid of the error and 2) It will put the log file into a folder shared with your host. You can look at the log file on your host OS without having to SSH over to your VM and figure out where the file is buried in the VM OS.

It seems the file needs to be world writable to avoid the error message.

Even doing this:

sudo chown www-data:www-data /tmp/xdebug-remote.log
sudo chmod 664 /tmp/xdebug-remote.log

Doesn’t work, which I thought would since php5-fpm runs under www-data, and that makes it group writable…