_php tutorial on using PHP plug-in installation and Xdebug configuration in eclipse

Source: Internet
Author: User
Tags phpinfo vc9
Since the Android development team has been fascinated by Android automation testing, all the time using eclipse as a development tool. Previously using Zend Studio 9.0.1 as a development tool for PHP, and now abandoning the use of Zend Studio 9.0.1, with the Eclipse PHP development plug-in, so plan to use eclipse development in the future. This is convenient. Installing the PHP plugin on eclipse is simple enough to download the plugin to http://sourceforge.net/project/showfiles.php?group_id=57621. Unzip the download to the plugin. And put the extracted files in the features folder in the Eclipse's features folder. The files inside the extracted plugins are placed in the Eclipse's plugins folder.

Configure the debugging capabilities of Eclipse for PHP

Here is the detailed procedure.

Download and install the appropriate software

JDK is absolutely necessary, it is the most basic requirement to run Eclipse, download here.

Eclipse has integrated the PHP development plugin version here to download, select the corresponding version of the operating system to download to local.

Xdebug to download here, please select the appropriate file to download according to your PHP version.

episode: How To Choose PHP 5.2. Version 17.17 of Xdebug

1, open http://www.xdebug.org/find-binary.php, will you phpinfo when the source of the display information copy to the input box, and then submit, Xdebug will tell you which version should be downloaded.

2. Enter the http://www.xdebug.org/download.php page and you will see many versions and versions of the same version. Here is a doubt, VC9, VC6, ts What do these mean? If you have doubts, please visit: PHP in TS and NTS versions-the difference between VC6 and VC9 compiled versions
3, learned that PHP 5.2.17.17 version of xdebug should download Xdebug 2.1.2 version of PHP 5.2 VC6 TS. As for 32-bit systems or 64-bit systems, it depends on your machine.

Because

Server arbitrary, recommended to use the Apache+php module installation method.

Installing the Software

After installing the JDK first, please follow the steps below to configure the system variables.

Next is the installation Eclipse,eclipse not how to set up, as long as the set jdk,eclipse placed in any position can be directly run

Xdebug Installation

Place the file in the Php/ext folder

Xdebug Configuration

Open php.ini

Add the following configuration code to the last line, and the configuration instructions are already commented
Copy the Code code as follows:
; Xdebug Configuration
[Xdebug]

; Load into Xdebug
Extension=php_xdebug-2.1.2-5.2-vc6.dll
; Turn on auto-tracking
Xdebug.auto_trace = On
; Turn on exception tracking
Xdebug.show_exception_trace = On
; Turn on remote debugging auto-start
Xdebug.remote_autostart = On
; Turn on remote debugging
Xdebug.remote_enable = On
; Collecting variables
Xdebug.collect_vars = On
; Collect return values
Xdebug.collect_return = On
; Collect parameters
Xdebug.collect_params = On

Restart the server after saving.

Now use Phpinfo () to view the PHP configuration, if the installation is successful, you should see the following information:

Let's talk about eclipse configuration

1. Failed to start, stop, restart Apache service through Eclipse.

Reason:

A, the configuration is not correct, the correct configuration as shown:

2, because I myself according to PHPSTUDY2011B package PHP integration environment, Apache service name is apache2, but Eclipse is started by default is apache2.2, so I will register the name of the Apache service changed to apache2.2 after the normal.

Eclipse opens CI, more than n warnings appear

Similar to the following information:

Description Resource Path Location Type The local variable $_ci_path could not have been initialized loader.php/ci/system/c Ore Line 752 PHP problem

As shown in the following:


It probably means that the local variable is not initialized, that is, the initial value is not assigned. This is very common in PHP. So given so many warnings, looking a bit uncomfortable. Then get rid of it.

The solution is:


Change the above red selection from the original warning to ignore.

http://www.bkjia.com/PHPjc/326781.html www.bkjia.com true http://www.bkjia.com/PHPjc/326781.html techarticle since the Android development team has been fascinated by Android automation testing, all the time using eclipse as a development tool. Previously using Zend Studio 9.0.1 as a PHP development tool, now give up ...

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