Debug Component doesn't work.

I have set this in my bootstrap file:

$debug = new \Phalcon\Debug(); $debug->listen();

I have made the following to generate an error in my index method of my Client controller:

public function indexAction() {

  $Cities = City::find(1,2,3,
            array(
               "order" => "updated DESC",
                "limit" => 10)
);
 $this->view->setVar("Cities", $Cities);

}

This generates a white page with the text

I can't seem to get any real error display. All errors with the framework seem to be of this format, without saying where anything occurred. I am on Phalcon Version: 3.0.3 , PHP Version: 5.6.28 and Phalcon DevTools Version: 3.0.4 Is there something that I am doing wrong?

Many Thanks



2.9k
edited Mar '17

Look in your public/index.php file - that's responsible for displaying exceptions to the end user if they're not caught further up in the runtime. It's most likely doing something like echo $e->getMessage(). Add someting like echo "<pre>". $e->getTraceAsString() ."</pre>"; to show a backtrace.

Also note:

Any Try/Catch blocks must be removed or disabled to make this component work properly.

Can you also provide an MCVE?

Also, what does the following mean?

I can't seem to get any real error display.

edited Mar '17

@H thank you for your repaly 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 and when the bug is in controller on volt view, it only shows simple text error message