2

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...

2
  • 2
    It has nothing to do with symfony itself, it is only about how to debug php. Google for xdebug Commented Jul 9, 2012 at 21:50
  • not sure why this gets down votes. There are tools to debug PHP itself and also additional tools for debugging Symfony specifically. It's a legitimate question. Commented Jul 9, 2012 at 22:26

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

2 Comments

Could you say a bit more about this bug - or link, maybe? I've actually used XDebug/NetBeans/ZF combination with great success (it saved me a LOT of time spent otherwise in var_dumping), but perhaps I missed something?
If you check the "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 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.