How to debug a PHP program with Php-eclipse ____php

Source: Internet
Author: User
Tags php debug php debugger

I just contact Php-eclipse, today just put the debug PHP method, issued to share with you.

First step: Go to Eclipse's website to download PHP-ECLIPSE:HTTP://WWW.ECLIPSE.ORG/DOWNLOADS/PACKAGES/ECLIPSE-PHP-DEVELOPERS/HELIOSSR1

Step two: Download xdebug (I am using Php_xdebug-2.1.0-5.2-vc6.dll, download address is located in: http://xdebug.org/download.php), and put into "Php5/ext"

Step three: Find the php.ini in the PHP5 and add the following configuration information at the end of the file:

[Xdebug] zend_extension_ts= "C:/Program files/phpstudy/php5/ext/php_xdebug.dll" xdebug.auto_trace = on Xdebug.show_ Exception_trace = on xdebug.remote_autostart = on xdebug.remote_enable = on xdebug.remote_host = 127.0.0.1 xdebug.remote_p ORT = 9000 Xdebug.remote_handler = DBGP xdebug.profiler_enable = on xdebug.profiler_output_dir= "C:/Program Files/ Phpstudy/php5/log "

Pay special attention here: if there are other zend_extension_ts in the file, you need to comment out, otherwise Apache will not be able to start.

Fourth step: Start Apache.

Step Fifth: Find "PHP Debug" in the properties of Eclipse's project, choose "XDebug" in PHP debugger

Then configure:

Sixth step: Again in windows->preferences inside the configuration of PHP Servers

Next, you go to the debug interface and you can start setting breakpoints to debug.

Related Article

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.