C + +-How to check the dispatch order of the PHP kernel, do not want to compile each time and see if you have executed the branch you want

Source: Internet
Author: User
The problem is this, I want to debug the PHP kernel to see the specific file calls, the general call structure itself probably know, but the specific do not know how to easily debug

My current approach is to manually php_printf some information, and then recompile PHP to see if this is the right step, but it takes a long time to recompile.

So I want to ask you there is no good way to debug!

Reply content:

The problem is this, I want to debug the PHP kernel to see the specific file calls, the general call structure itself probably know, but the specific do not know how to easily debug

My current approach is to manually php_printf some information, and then recompile PHP to see if this is the right step, but it takes a long time to recompile.

So I want to ask you there is no good way to debug!

Strace

phpadd in the compile time configure --enable-debug php to open debugging mode, when compiled php with debugging information, you can debug by gdb the breakpoint. I don't know if this is going to meet your needs?

I don't know what IDE you're using, I'm just introducing my experience. I developed the PHP extension use CLion , using the debug mode of PHP, in the clion directly using the GCC compiler extension run, breakpoints can be directly in the compiler, debugging run, stepping is normal use. If the source code of PHP is still retained, you can hit the breakpoint directly into the source code. Compile to start debugging one step.

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