Debug-PHP breakpoint debugging

Source: Internet
Author: User
Php can be used for breakpoint debugging like JavaScript. Recently, it uses a foreign framework set template and is not familiar with its syntax. You can use breakpoint debugging to check the running position. Can zenddebug be implemented? Or is there any other method? Do not go back to exit, die, or something. php can perform breakpoint debugging like JavaScript. Recently, it uses a foreign framework set template and is not familiar with its syntax. You can use breakpoint debugging to check the running position.

Can zend debug be implemented? Or is there any other method?

Do not return exit or die or something.

Reply content:

Php can be used for breakpoint debugging like JavaScript. Recently, it uses a foreign framework set template and is not familiar with its syntax. You can use breakpoint debugging to check the running position.

Can zend debug be implemented? Or is there any other method?

Do not return exit or die or something.

Release of PHP debugging Technical Manual (1.0.0 pdf)

If the document cannot be accessed, you can download it from the address below (not guaranteed to be valid for a long time ).
URL: http://pan.baidu.com/s/1hqD27Ve password: 5r0y

PDF File Content preview:

I think phpstorm + xdebug is better configured than zend + xdebug.

This is also a method:
Http://www.cnblogs.com/gidot/p/4307709.html

In fact, the execution process can also be seen through echo/exit output, or xdebug

Phpstorm can be used for breakpoint debugging and zend, similar to java eclipse debugging.

During my learning process, I basically did not encounter any breakpoint tests. Because php does not run a large number of scripts, if there are 2-3 scripts, You can manually use var_dump and exit () to achieve the breakpoint test. If there is a better method, please leave a message below, th

Zend Studio/Zend Eclipse PDT/Netbeans both support breakpoint debugging with Xdebug and ZendDebugger. Because of PHP's Web running Features, PHP can work with print_r/var_dump/exit to output the variable data you want to know, and then exit and exit the script for execution, which is convenient and intuitive.

I am debugging this way. For example, if PHPSTORM is used, its breakpoint is not easy to use in MVC mode.

function breakCode($code){    debug_print_backtrace();    echo "";    var_dump(func_get_args());    exit;}

Configure xdebug in zend studio or sublime text to implement breakpoint debugging of php code.
Http://www.sitepoint.com/debugging-xdebug-sublime-text-3/

Var_dump ();
Exit ();

Well, since you have asked questions with sincerity .........
Don't stop me. I'm not crazy!

Last year I wrote a Php tool for vs. I just want to say that it is so nice to debug php with!

Well, I use it so well that you can use it so well.

I just wrote a PhpStorm + Xdebug debugging PHP program blog (although reprinted), if the subject is also using PhpStorm can look at: http://blog.csdn.net/ljfrocky/article/details/46531137

Install xdebug extension in php
How to configure the debug environment with development tools and find the relevant information online?
You want to see the structure of the Framework to directly adjust the index. php file.
Then, break the breakpoint in the corresponding code line.

A simple exit () meets all your debugging needs. Don't be lazy. Something less intelligent can accurately analyze which one in your framework is what you want, in addition, the biggest advantage of exit-breaking debugging is to be able to understand the unfamiliar internal running logic of the framework and at least have a general understanding. This is the process of debugging bugs, it is also a good learning process.

I really think it's enough

Sometimes var_dump and xdebug are enough, unless the nested loop is deep.

function pd($array) { echo '

';    print_r($array);    echo '
';die;}
Then, where is the pd ()?

Add a browser plug-in to xdebug.

Exit ()

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.