In addition to the standard troubleshooting steps to display errors in your browser, ExpressionEngine also offers some helper functions to help troubleshoot your add-on code.
Dumps the variable as a pre-formatted block. Essentially what
var_dump does in PHP, but looks nicer.
“Dump and die”. Outputs pre-formatted dump of variable and stops code execution.
Outputs the debug backtrace of the function being called. Useful if you need to find out which function called your code. The number is the number of steps back, or the functions, to be listed.