How to Use PHP-Eclipse to debug PHP programs

Source: Internet
Author: User
Tags php debug php debugger

I have just come into contact with PHP-Eclipse. Today I have just finished the debug PHP method and shared it with you.

 

Step 1: Go to the eclipse official website to download PHP-Eclipse: http://www.eclipse.org/downloads/packages/eclipse-php-developers/heliossr1

 

Step 2: Download xdebug (I'm using a php_xdebug-2.1.0-5.2-vc6.dll located in: http://xdebug.org/download.php) and put it in "PhP5/EXT"

 

Step 3: Find PHP. ini in PhP5 and add the following configuration information at the end of the file:

[Xdebug] <br/> zend_extension_ts = "C:/program files/phpstudy/PhP5/EXT/php_xdebug.dll" </P> <p> xdebug. auto_trace = on </P> <p> xdebug. show_exception_trace = on </P> <p> xdebug. remote_autostart = on </P> <p> xdebug. remote_enable = on </P> <p> xdebug. remote_host = 127.0.0.1 </P> <p> xdebug. remote_port = 9000 </P> <p> xdebug. remote_handler = dbgp </P> <p> xdebug. profiler_enable = on </P> <p> xdebug. profiler_output_dir = "C:/program files/phpstudy/PhP5/log"

Note: if there are other zend_extension_ts files in the file, comment them out. Otherwise, Apache cannot be started.

 

Step 4: start Apache.

 

Step 5: Find "php debug" in the properties of the eclipse project and select "xdebug" in the PHP debugger"

 

 

Configure it again:

 

 

Step 6: Configure PHP servers in Windows> preferences.

 

 

 

Next, go to the debug interface and start to set the breakpoint for debugging.

 

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.