(new \Phalcon\Debug())->listen(); doesnt work for me ...

I have enabled (new \Phalcon\Debug())->listen(); based on manual page. I have removed try/catch from index.php but it doesnt work for me. It simply still shows common text error message as not enabled. What is strange, if I make a bug in index.php, the Debug screen appears correctly, but when the bug is in controller on volt view, it only shows simple text error message ... Any idea whats wrong? (using latest Phalcon 1.3.1 with PHP 5.5.11 on Windows under Apache)

Can you show the code for the page that has the \Phalcon\Debug() code on it? That should be on the index.php page that starts everything up.

edited Apr '14

Very common configuration as below. When a make a bug in controller in shows me one line erorrs like this:

Fatal error: Class 'Phalcon\Forms\Form2' not found in C:\apache24\htdocs\elastic\app\controllers\IndexController.php on line 23

Using composer I can include and activate the Whoops, that works fine for catching errors, but the internal Phalcon Debugger would be much better. Is there any php.ini configuration that is required? Recently I have switch from PHP 5.4 to 5.5 but the result is the same ...


    (new \Phalcon\Debug())->listen();
    $config = include __DIR__ . "/../app/config/config.php";
    include __DIR__ . "/../app/config/loader.php";
    include __DIR__ . "/../app/config/services.php";

     $application = new \Phalcon\Mvc\Application($di);
     echo $application->handle()->getContent();

The only fundamental difference between your setup and what I do, is I instantiate Debug() first, then call listen():

$Debug = new \Phalcon\Debug();



Can you catch Fatal error?

No, fatal errors are not catchable, because they're not "thrown". There's no way to nicely handle a fatal error - which is probably good because there is no way they should be part of your normal program flow - like exceptions may be.