PHP configuration with debug during eclipse Development

Source: Internet
Author: User
Tags vc9

1: complete php development process with debug configuration in eclipse

2: Install the Java runtime environment. This is the eclipse runtime. install it on your own.

3: after installing the PHP runtime environment, I configured it myself using Apache + PHP, And the PHP version 5.3.apache version is 2.2. I set the Apache home directory to my D: \ phproot. The main directory of my PHP is

D: \ php-5.3.8-Win32-VC9-x86. The following is my focus:

1: Download eclipse PDT all in one address: http://downloads.zend.com/pdt/all-in-one/helios/SR-1/eclipse-php-helios-SR1-win32.zip

2: Download xdebug (because my PHP version is ts, that is, thread security, and the commonly used Zend debuger I didn't see this version of 5.3, so I chose xdebug, I did not expect xdebug configuration is simpler but), is: http://www.xdebug.org/files/php_xdebug-2.2.1-5.3-vc9.dll

3. Place the downloaded DLL in the following places:

D: \ php-5.3.8-Win32-VC9-x86 \ ext \ php_xdebug-2.2.1-5.3-vc9.dll

4: Add the following statements under PHP. ini:

[Xdebug] zend_extension = D: \ php-5.3.8-Win32-VC9-x86 \ ext \ php_xdebug-2.2.1-5.3-vc9.dllxdebug.profiler_enable = onxdebug. auto_trace = onxdebug. collect_params = onxdebug. collect_return = onxdebug. show_exception_trace = onxdebug. remote_autostart = onxdebug. remote_enable = onxdebug. collect_vars = on

5. Restart Apache and create a PHP file to output phpinfo (). If you see the following, the installation is successful.

6: For eclipse, the first problem is to configure eclipse. Just take a closer look at the following:

7: as long as the above two configurations are complete, next, create an I project under eclipse (to make this project directory a subdirectory or a virtual directory under phproo can be accessed directly in eclipse)

8: Create a PHP file, place the breakpoint, and select:

Right-click the PHP file and choose debug as> php web page. Eclipse automatically opens the PHP file in the browser and runs it to the breakpoint:

 

Okay, it's much easier to configure than Zend debger...

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.