How to collect remote log for XDebug

Enable Xdebug logging by adding into php.ini the following line:

xdebug.remote_log=/log_path/xdebug.log , where log_path is the path to the existing directory. Please make sure that you have sufficient permission to write into this directory.

Please restart your web server after editing the file for changes to take effect.

 

To find php.ini used by command line, you need to run php --ini in the command line. 

To find php.ini used by the web server you need to open a web page with a simple PHP script: 

<?php phpinfo(); ?>

3 comments

" , where log_path is the path to the existing directory."     to *what* existing directory?   Where?  What directory?  On the machine that is running IntelliJ Ultimate (or phpStorm)?  Or on the remote server (/var/log/apache2/xyz) ?

1

this refers to the location on the machine running the php interpreter. It could be your own machine if you are running things locally, or it could be inside of a vm/remote server/docker container.

3

That's still not very clear.

Are you referring to the PHP directory (e.g. /etc/php/7.x)?  The project directory?

0

Please sign in to leave a comment.

Have more questions?

Submit a request