A wordpress plugin to help with debugging and development.
The modern dump function created by symfony. This function will output the variable in a readable format.
dump($var);
The modern dump function created by symfony. This function will output the variable in a readable format and then die.
dd($var);
You have access to all underlying symfony var dump functions, uses the same naming conventions.
This is an ajax ready take on dump(), which outputs in a readable format via the network tab on the browser.
adump($var);
Casts true to
TRUE
, false toFALSE
and null toNULL
. To avoid confusion caused with phps print_r function.
This is an ajax ready take on dd(), which outputs in a readable format via the network tab on the browser and then dies.
adie($var);
This function will write to the debug.log file in the wp-content directory.
write_log($var);
This writes to a custom pc-debug.log file in the wp-content directory. This is useful for separating out debug data, from general errors.
pclog($var, 'error');
pclog($var);
Will only create the file if it does not exist.
This function will return true if the current request is a rest request.
if(pinkcrab_is_rest()){
// Do something
}
This will output all the scripts and styles that have been enqueued on the page.
This will output all the hooks that have been added to the page. You can pass multiple hooks by comma separating them.