Author: Haohappy Msn:haohappy at MSN.com blog:http://blog.csdn.net/haohappy2004 2006-07-04 Why do I need Debugger?Many PHP programmers debug using Echo, Print_r (), Var_dump (), printf () and so on, in fact, for developers with a richer development experience these are enough, they can often in the process of program execution, By outputting the value of a particular variable, you can tell whether the program is executing correctly, or even how efficient it may be (some time functions, of course). So why do we need a dedicated debug program to monitor our program's operation? The answer to this question may be left behind to reveal.
What is Xdebug?Xdebug is an open source PHP program debugger (a debug tool) that can be used to track, debug, and analyze the health of PHP programs. Xdebug is now the latest version of Xdebug 2.0.0BETA6, which supports PHP4/PHP5. Official site: www.Xdebug.org
How to install Xdebug ? Take Php5.1.4,windows platform as an example (other PHP version, other platforms please refer to official documents): 1. Login www.xdebug.org, on the right side of the home page has a Windows modules, select the php5.1.2+, download Php_xdebug-5.1.2-2.0.0beta6.dll file; 2. Place the downloaded Php_xdebug-5.1.2-2.0.0beta6.dll in the C:\php5\ext directory and rename it to 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 "after the directory" I:\Projects\xdebug "for the data file you want to put Xdebug output directory, can be set freely. 4. Restart Apache;5. Write a test.php with the contents of
If you see Xdebug in the output content, the installation configuration is successful.
now we can start using Xdebug Powerful features!
http://www.bkjia.com/PHPjc/318377.html www.bkjia.com true http://www.bkjia.com/PHPjc/318377.html techarticle Author: haohappy msn:haohappy at msn.com blog:http://blog.csdn.net/haohappy2004 2006-07-04 Why do I need Debugger? Many PHP programmers debug using Echo, Print_r (), Var_dump () 、...