Please define "debug". Are you using the error_log function? It is hard to tell what you are you tring to do.
Likely a permissions problem. For php to log to a file, like php.ini entry, you need to make sure the folder is writable by the user used by LSWS/PHP process.