I'm assuming that you want to debug your PHP code, not Phalcon extension. If you mean debugging Phalcon framework itself you should install Zephir
for code modifying and use gdb
to run php command (at least on linux, not sure what about other systems).
Standard var_dump()
, echo
, printf
and die
It works well with all the phalcon objects, just print out variables you want to debug using var_dump() (or other output functions) and use die()
before execution your view code. If view
part of application get executed will most likely replace your debug printings.
Alternatively you can also pass your variables to view part of your application and just simply use <?php var_dump($variable)?>
or if you're using volt just {{dump(variable)}}
.
Using XDebug Remote
This is the way I personally like the most. Yes, XDebug Remote works great with Phalcon. Personally I use NetBeans but you can use other IDE's as well. There are many tutorials for configuring all the popular IDEs so I'm not going to write it again. Note that Phalcon team suggests to use XDebug 2.2.3 or greater for better compatibility.
how to configure XDebug on PHP Storm
how to configure XDebug on NetBeans
how to configure XDebug on Sublime 3
You can read more about debuging Phalcon in Phalcon's Documentation