OctoberCMS debugging – DUMP() debug function for templating and Debugbar plugin

This is a very handy function for debugging the template.

reference: https://octobercms.com/docs/markup/function-dump

Usage:

{{ dump(user) }}
{{ dump(user, categories) }}
{{ dump() }}

It'll show you the variable type and its content, eg. if you have an object variable it'll show you the member functions or if you have a collection variable, it'll show you the keys and value types.

The following screenshot indicates the front-end output of an array variable:
octoberCMS dump function debug output screenshot for template front end

Here is another useful OctoberCMS plugin that'll help debugging as it could show much more information in the backend.

OctoberCMS DebugBar plugin

OctoberCMS debugbar plugin on GitHub: https://github.com/Flynsarmy/oc-debugbar-plugin

on OctoberCMS plugins page: https://octobercms.com/plugin/bedard-debugbar

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.