New question: What does PHP code use to debug?

Source: Internet
Author: User
Tags learn php php debug php error
What tools do PHP code use to debug? Online has said Var_dump, but I do not understand how to use, there are any other easier way?

I am a novice, please be sure to answer the details. Thank you so much.


Reply to discussion (solution)

1, look at the error log, but also the most direct
2. Compulsory interception of var_dump in the middle of script (); exit;
3. PHP Debug

1, look at the error log, but also the most direct
2. Compulsory interception of var_dump in the middle of script (); exit;
3. PHP Debug
+1

Echo/print_r/var_dump () is a common use for these few.

And then open the PHP error message function

Good for Zend Studio.

Zend Debugger
Xdebug

Always use
Echo '

';
Print_r ($var);
How did it break?

Concrete need to see the landlord debugging what information. If you are printing sql or Die ($sql), if you are viewing the page program execution error, you can open the wrong debug switch,

Echo/print_r/var_dump () is a common use for these few.

And then open the PHP error message function

Open PHP error prompt function

How do I open this? Thank you.

I want to test the same as ASP, as long as there are errors, will prompt. Now is nothing to hint at.

Good for Zend Studio.
Zend Studio is an additional tool software, isn't it?

Reference to the 3 floor jordan102 's reply: Echo/print_r/var_dump () commonly used in these few.

And then open the PHP error message function

Open PHP error prompt function

How do I open this? Thank you.

Ini_set ("Display_error", on);
Error_reporting (E_all);

Reference 8 Floor KQYX_CN reply: Reference 3 floor jordan102 reply: Echo/print_r/var_dump () commonly used in these few.

And then open the PHP error message function

Open PHP error prompt function

How do I open this? Thank you.

Ini_set ("Display_error", on);
Error_reporting (E_all);
......

Where the Ini_set function is used to modify the INI configuration file of PHP, which means to open the function of displaying errors
The error_reporting function is used to determine which errors are displayed, E_all represents all errors, including warning and notice

1, look at the error log, but also the most direct
2. Compulsory interception of var_dump in the middle of script (); exit;
3. PHP Debug

1, look at the error log, but also the most direct
2. Compulsory interception of var_dump in the middle of script (); exit;
3. PHP Debug
Where would you like to see 1?

Debugging?? Do not know what you use the development tools are beginners with Notepad, will be written out of the page to run, if not the results you want, you can do echo the simplest! And in general, the SQL statement will be wrong, then you echo the SQL to put the results in the database to run, to see where the error

Write code I use EditPlus, the environment is configured with the Guardian God's suit, there is no other software.
I was just beginning to learn PHP.
With Echo? For example, I write a cycle of error, then I should echo which sentence?
Should I look for a book? Not as the online friends say, only to see the electronic version of the introductory tutorial, the tutorial is not how to debug.
Perhaps everyone to my these problems as not a problem, it is relatively simple, but for me is not detailed, let me do not know how to operate.

Use Dreamwave.

There are some people who know why Xdebug at Eclipse.


[/IMG]


What's wrong with this configuration?
Port I also checked the NETSTAT-ANP | grep 9001 did not occupy Ah, although not at the breakpoint to listen, but it shows the results I want, but why can not debug the breakpoint?

Spend the evening time with two days or not to match up, write a bird web real egg pain
The amount .... No, no, no, no, plug var_drump.

I think Www.php100.com's tutorial is good, you can go and see.

  • 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.