How to debug data on particular variable inside in controller.

How can i know or how can i debug data reside on variable in phalcon version 3.1.2.

edited Jun '20

I assume you're trying to echo it and you're not seeing it on the screen? That's because Phalcon buffers all output. After you echo the variable, you can call ob_flush() or, what I often do, exit().

I've also personally used Tracy: and it has a bd_dump() function that lets you log stuff to an error console you can access from the page.

Yeah i do same exit; :)


Instead of stopping on exit, I write this in the view for that action:

{{ content() }}

(I mainly use volt)


I use phalcon-debugbar to debug the code, and I am very happy with it

I use xdebug.