ExpressionEngine Docs

Code Debugging

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.

dump($var)

Dumps the variable as a pre-formatted block. Essentially what var_dump does in PHP, but looks nicer.

dd($var)

“Dump and die”. Outputs pre-formatted dump of variable and stops code execution.

trace(10)

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.