## Running and debugging libaccounts-glib applications

There are various debugging techniques available for applications which use libaccounts-glib.

## Environment variables

There are several environment variables which can aid in debugging libaccounts-glib applications by changing runtime behavior.

Supported envionment variables

`ACCOUNTS` | Specifies the path to the accounts database. If this is unset, the database is stored in `$XDG_CONFIG_HOME/libaccounts-glib`, which normally expands to `~/.config/libaccounts-glib`.
`AG_DEBUG` | Can be set to a list of debug options, which causes libaccounts-glib to print different debug information. `AG_DEBUG` options
`time` | Print timing debug messages.
`refs` | Print reference-counting debug messages.
`locks` | Print locking debug messages.
`queries` | Print SQL query debug messages.
`info` | Print miscellaneous debug messages.
The special value `all` can be used to turn on all debug options. In order for debug messages to be printed, libaccounts-glib must have been configured with the option `--enable-debug`. Additionally, GLib must be configured to print debug messages at the required debug level, for example with `G_MESSAGES_DEBUG` set to `all`.
`AG_APPLICATIONS` | Specifies the path to search for application manifest files.
`AG_PROVIDERS` | Specifies the path to search for provider description files.
`AG_SERVICES` | Specifies the path to search for service descriptions files.
`AG_SERVICE_TYPES` | Specifies the path to search for service type description files.