What debugging tools are available in CiviCRM?
Debugging from your browser
CiviCRM comes with several built-in debugging tools. You will need to enable the debug and backtrace options to use these tools. Once enabled, you invoke the tools via URL parameters.
You can enable debugging in: Administer CiviCRM >> Global Settings >> Debugging
Available debugging tools are:
You will see a page of warnings and error messages immediately after running directory cleanup. This is normal and expected — the errors will disappear as soon as you navigate to a new CiviCRM page.
WARNING: Do not leave debugging enabled by default as it can be used to expose configuration information to unauthorized browsers.
Debugging in code
The CiviCRM framework includes a few useful debugging methods which you can insert into any codebase file to get more information about what's happening in a particular function or workflow (NB: don't forget to add require_once 'CRM/Core/Error.php'; before each of the following statements):
All logging output is written to CiviCRM.log in the configured "Temporary Files" directory (see Administer CiviCRM » Global Settings » Directories). By default this is:
<drupal root directory>/files/civicrm/upload/CiviCRM.log
Some PHP functions that may also be useful for debugging include: