Debugging PHP with XDebug
Debugging web applications has always been a problem. How do you step through scripts, view variable information and create breakpoints when your application is running on a remote server?
Step in XDebug. In a nutshell XDebug runs on the server and allows you to control how your application runs from a client. XDebug calls this concept remote debugging. We use Eclipse for our PHP development however there are a number of other clients XDebug supports including Dev-PHP, NetBeans, Notepad++, PHPEdit and a number more. The client connects to the XDebug running on the development server to send control messages and receive server data.
The biggest feature in my mind is the ability to set breakpoints and see the values of any variable that has been initialized in your script. Eclipse provides a conveniant table display to show all variables. This includes PHP environment variables (_SERVER, _COOKIE, _ENV, _FILES, etc…), global and local variables.


October 24th, 2008 at 9:27 am
[...] tool that can be useful is XDebug which we’ve previously talked about here. One thing not covered in our previous blog article is the ability to perform benchmark analysis on [...]