Ref debug
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body

Using PHP-ref for debugging, using for example r() instead of devels dpm().
Dependencies
Libraries API and PHP-ref.
Install
Download the PHP-ref library, and place it in the the libraries folder.
Example:sites/all/libraries/php-ref
Path for phpref.php should in the example be:sites/all/libraries/php-ref/phpref.php
Usage
Enable Libraries module and Ref debug. Settings are available under admin/config/ref.
But to output the debugging information, you need to add the debugging functions in your code.
Basic usage from php-ref documentation:
Display info about defined classes
r(get_declared_classes());
Display info about global variables
r($GLOBALS)
To print in text mode you can use the rt() function instead:
rt($var);
To terminate the script after the info is dumped, prepend the bitwise NOT operator:
~r($var); // html
~rt($var); // text
Prepending the error control operator (@) will return the information:
$output = @r($var); // html
$output = @rt($var); // text
Keyboard shortcuts (javascript must be enabled):
X - collapses / expands all levels
For more options, see: https://github.com/digitalnature/php-ref
