Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Improve dump() with kint - debugging helper

I want to advise me how I can add a function Kint() for Volt. This tool is visually me useful when debugging. Help me please. kint



You just include it into your service file, take look example


I add function to compiler:

        '.volt' => function ($view, $di) {
            $config = $this->getConfig();

            $volt = new VoltEngine($view, $di);

                'compiledPath' => $config->application->cacheDir,
                'compileAlways' => $config->dev_environment,
                'stat' => $config->dev_environment,
                'compiledSeparator' => '_'

            $compiler = $volt->getCompiler();

            if ($config->dev_environment){

                    function ($resolvedArgs, $exprArgs) {
                        return 'd('.$resolvedArgs.')';     // <-- kint function

            return $volt;
        '.phtml' => 'Phalcon\Mvc\View\Engine\Php'

in index.php

* Debug
            //require '../vendor/raveren/kint/Kint.class.php';
            Kint::$theme = 'solarized';

            $debug = new \Phalcon\Debug();



  "require": {

  "require-dev": {
    "raveren/kint": "*"


Work fine.

edited Sep '16

Now, this is useful!

Volt can have odd behaviour sometimes.

P.S. you cannot use both native Phalcon Debug component and Kint tool. You have to disable Kint in order to use Phalcon Debug and vice versa.

kint() == var_dump()

I will find out about the use of debug Phalcon.

But so far I have had no problem using the two, since kint is a var_dump ()

kint() == var_dump()

That is quite not true. Kint is much more than var_dump. Better than xdebug or similiar.