You might not want to bloat your system with whatever debug functionality you need whilst its being developed. Instead you can add a line in your php.ini that will tell PHP to include a file from the local file system each time PHP runs and deals with a request. There is one caveat however, that if you’re running CLI commands (command line) the file is not included.
To set this run, open your php.ini file and look for something like the following:
; Automatically add files before PHP document. ; http://php.net/auto-prepend-file auto_prepend_file =
The add the file you want to include from the local file system:
auto_prepend_file = "/var/www/debug.php"