Author:HaohappyMSN: haohappy at msn.comBlog: http://blog.csdn.net/haohappy20042006-07-04 Why?Debugger?Many PHP programmers use echo, print_r (), var_dump (), and printf () for debugging. In fact, this is enough for programmers with rich development experience, during program execution, they can output the values of specific variables to determine whether the program is correctly executed, even the efficiency can be seen (of course, some time functions may need to be used ). So why do we need a special debugging program to monitor our program running? The answer to this question may be later.What isXdebug?Xdebug is an open-source PHP program debugger (a Debug tool) that can be used to track, Debug, and analyze the running status of PHP programs. The latest version of Xdebug is xdebug 2.0.0beta6 and supports PHP4/PHP5. Official site: www.Xdebug.org How to installXdebug?Take PHP5.1.4 and Windows as an example (for other PHP versions, see the official website for other platforms): 1. log on to www.xdebug.org, there is a Windows modules on the right of the home page, select PHP5.1.2 +, download the php_xdebug-5.1.2-2.0.0beta6.dll file; 2. put the downloaded php_xdebug-5.1.2-2.0.0beta6.dll in the C: \ php5 \ ext directory and rename it php_xdebug.dll; 3. edit php. ini, add the following lines: extension = php_xdebug.dll [Xdebug] xdebug. profiler_enable = onxdebug. trace_output_dir = "I: \ Projects \ xdebug" xdebug. profiler_output_dir = "I: \ Projects \ xdebug" Ebug "you can set the directory of the data file output by Xdebug as needed. 4. Restart Apache. 5. Write a test. php file with the following content:<? Php phpinfo ();?>If xdebug is displayed in the output, the installation and configuration are successful.Now we can start usingXdebugPowerful functions!