It looks like you're new here. If you want to get involved, click one of these buttons!
Hey, I wonder how do you debug Fuel CMS?
I usually use KINT (https://github.com/kint-php/kint) to print variables, objects etc. The nice thing about KINT is, that it also shows me methods and hints. Unfortunately, when I want to output($CI) or even subsets d($CI->fuel)
, the server runs out of memory. The same happens for var_dump($CI). Why is that and how to achieve, what I described?
Comments
FUEL doesn't have it's own debugging function (although it would be a nice addition I think). The $CI object has child objects that have properties that reference the $CI object and so debugging that object can be problematic since it causes and infinite loop (although I thought Kint handled that but perhaps not). There are a couple of homegrown functions found here to help with that:
http://php.net/manual/en/function.print-r.php
Thanks for hinting Kint depth limit. It works to lower the limit.
In case someone is interested in it:
I installed Kint via composer (so it's available in the framework, see config.php ->
$config['composer_autoload']
).Created
\fuel\application\helpers\kint_helper.php
(enabled it in autoload.php) with the following contentAs much as I love Kint, I think Tracy would be a great addition to fuel cms for exception handling and debugging. What do you think?
https://tracy.nette.org/en/
Thanks for the code example. I believe CI 4 is using that now too:
https://github.com/bcit-ci/CodeIgniter4