rawdebug
Low-level debugging functions that can be used even if your site isn't working at all. Examine variables and get a stack trace. This is mostly just code, not a module. It has no dependencies.
Features
There's no need to install or enable this module, but if you do you'll get some help text. Enabling the module will also define the rawdebug functions if they aren't defined, but it's best to include the rawdebug.php file from settings.php so it can be used even if modules aren't loading.
Instead, simply click a release below, download the .zip or .tar.gz file, and extract that to a temp directory. Then, see README.md for the instructions. As described there, setting this up involves copying a file and editing settings.php.
After setting it up, you'll have three new debug functions available. For example, this will write a string, a variable, and a stack trace to a log file:
rawdebug('safe_tokens', $val, dbt());
See rawdebug.php for more information.
Notes
This is only meant to be installed on dev sites that are not publicly-available. Setting this up on a public website is not recommended.