I started to use Symfony2 after Ruby on Rails and I was able to debug Ruby code. I am curious about php on Symfony2. Is it possible to debug it? Do I need to have a extension, bundle or else?
Thanks...
I started to use Symfony2 after Ruby on Rails and I was able to debug Ruby code. I am curious about php on Symfony2. Is it possible to debug it? Do I need to have a extension, bundle or else?
Thanks...
Yes, XDebug FTW, but Symfony2 actually has its own debugging tools - like Web Debug Toolbar, for example, which can be quite handy (for checking SQL queries sent, at least). You can read more about their setup and usage here. Besides, you may need to separate the development environment from the production one (it's also not a concern of XDebug), here's something about how to do it right.
If you need a powerful debugger and use Windows as your primary development platform then PHPEd's debugger is by far the best PHP debugger there is. Do note that there are server extensions for all operating systems so you actually only need your development computer to be Windows based but your deployment and testing servers can be whatever you want.
If you however use Linux xDebug might satisfy your needs but do take note that it has some quirks and it doesn't get along well with some IDE's like NetBeans etc. NetBeans is particularly troublesome because a direct bug in xDebug prevents it from using the "on the fly" evaluation capability (you won't be able to use evaluation bubbles during the debugging process).
Also PHPEd comes with a very powerful profiler.
Tools->Options->PHP->Debugging->Watches and Balloon Evaluation" option it will first cause NetBeans to report false debug results and eventually crash it because of a known xDebug instability bug (you even get a warning when you try to check the option). However if this function is disabled watches and "on the fly" evaluation will not be available which you have to admit makes a debugger pretty useless. Not only that but xDebug also has nesting issues which often results in failure to go deeper into watched objects etc. That's why I licensed PHPEd. Its that good :)