Xdebug
suggest changeXdebug is a PHP extension which provides debugging and profiling capabilities. It uses the DBGp debugging protocol.
There are some nice features in this tool:
- stack traces on errors
- maximum nesting level protection and time tracking
- helpful replacement of standard
var_dump()function for displaying variables - allows you to log all function calls, including parameters and return values, to a file in different formats
- code coverage analysis
- profiling information
- remote debugging (provides interface for debugger clients that interact with running PHP scripts)
As you can see, this extension is suited to a development environment. The remote debugging feature can help you debug your PHP code without numerous var_dump calls, using a normal debugging process as in C++ or Java.
Usually, installing this extension is very simple:
pecl install xdebug # install from pecl/pear
And activate it in your php.ini:
zend_extension="/usr/local/php/modules/xdebug.so"
In more complicated cases see these instructions
When you use this tool you should remember that: XDebug is not suitable for production environments
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents