How does PHP debug? How do I install the Debugging tools? What debugging tools are available

Source: Internet
Author: User
Tags php debug php debugging tools what debugging
How does PHP debug? How do I install the Debug tool? What debugging tools are available?
How does PHP debug? How do I install the Debug tool? What debugging tools are available?

------Solution--------------------
Download zendstudioenterpriseedition.v5.5.0.270, the Orthodox debugging tool.
------Solution--------------------
A master can solve most problems with the Echo, Print_r, Var_dump function, or PHP development tools Zend Studio, EditPlus. But for PHP beginners to learn the children's shoes have a certain degree of difficulty, and only through the above PHP debugging means, it is difficult to accurately find PHP performance problems, Xdebug is a very useful PHP debugging tools.
Xdebug as a PHP debugging tool, provides a rich set of debugging functions, you can also configure the Xdebug installation as Zend Studio, EditPlus debugging PHP third-party plug-in, by turning on auto-tracking (auto_trace) and analyzer functions, You can visually see the PHP source code performance data in order to optimize the PHP code.
Xdebug installation and Configuration reference documentation: http://www.cnblogs.com/qiantuwuliang/archive/2011/01/23/1942382.html
------Solution--------------------
PHP Debug Tools provides a variable debugging tool, including script tracking debugging, error debugging, manual debugging, database query debugging and other functions.
Project home: http://www.gosu.pl/debug/
Download Address: http://www.gosu.pl/debug/debug.zip?ver=1.00
------Solution--------------------
Basic Debugging:
1. Turn on debug function: php.ini Set error_reporting = E_all and display_errors = on restart Web service (Apache)
2. Refresh the error page to view the error prompt line number file name
3. Open the file to locate the error line. Like the code echo $ABC [2];
4. Understanding the Error:
A. View manuals understand the meaning of the error to understand the first to understand the language, such as the simplest Undefined index 2 means that the array does not exist the subscript also means that you have access to an array of elements that do not exist
B. If you already know how to change it directly, such as change to echo $abc [0];
C. Add Var_dump ($ABC) in the same place without knowing the contents of the variable to be displayed; Refresh the page to see what element $abc this thing contains.
D. Think that there should be $ABC [2], then find the source of the error, to the last, or with Var_dump (Debug_backtrace ());
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.