How do you debugPHP?

Source: Internet
Author: User
How do you debugPHP? How do you debug PHP?
What software is used?
My ide uses netbeans.
It is usually a line by line.

Alas, the code has an additional count,
It's a waste of morning.



Reply to discussion (solution)

Check apache log.

When an error is displayed, php will tell you all syntax errors.
However, no debugging tool can check the correctness of the business process for you. for example, if the code is written with an additional count, it is not a syntax error.

Run apache. log

Error log

Check for logical errors. var_dump is usually used for hitting.

Var_dump + 1

Enable error display error_reporting (E_ALL); clear the logic problem yourself !!

Breakpoint debugging ..

Check apache log.

How old are you...

1. error_reporting (E_ALL)
2. breakpoint debugging var_dump ()
3. breakpoint debugging tool of ide editor

Good, learning...
Thank you!

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.