1. Download eclipse, find it on the official website, and verify that the current system has a Java environment, the JDK and the JRE.
2. Installed PDT, the use of an online installation, the update address is already included in the default. It's just more trouble to update. (Omit if you download the Eclipse version that carries PDT directly)
3. Download the debugger, the debugger has two kinds, one time xdebug, another time zenddebug, this article uses Xdebug.
The download should be the source code package. Unzip, then CD to the directory, then phpize, sometimes there may not be this program, run sudo apt-get install Php5-dev, on it. Then the familiar config program appears./configure a string of black-and-white screen characters, followed by Make,make install. When the latter two commands are executed, sudo permissions may be required because it involves copying the program files to the system directory.
4. Create a Xdebug.ini file in/etc/php5/apache2/conf.d/, you can use VI or other text programs to add the following configuration items. The configuration content is as follows:
Copy the Code code as follows:
[Xdebug]
zend_extension= "/usr/lib/php5/20090626+lfs/xdebug.so"
Xdebug.remote_handler=dbgp
xdebug.remote_port=9000
Xdebug.auto_trace=on
Xdebug.collect_params=on
Xdebug.collect_return=on
xdebug.max_nestring_level=100
Xdebug.profile_enable=on
Xdebug.remote_enable=on
Xdebug.remote_host=localhost
xdebug.trace_output_dir= "/tmp"
xdebug.profile_output_dir= "/tmp"
Xdebug.idekey=webide
Xdebug.mode=req
The INI file placed in this directory will be loaded automatically by PHP.
At this point, the installation configuration for Xdebug has been completed.
5. Open Eclipse and select window preference to configure the service options first:
First configure debug, choose PHP Select Debug, PHP debugger selected as Xdebug. Then configure the server,
Select PHP Servers, and then pop up the menu: then click New, choose a name at name, and the URL is configured as the main URL for debugging.
Then set to default.
Finally configure PHP executables,add random name, path set to/usr/bin/php and then set the INI location in/etc/php5/apache2/php.ini
The SAPI type should be set to CGI, but it seems to be adjusting but not knowing why.
Finally, the PHP debugger will be set to Xdebug.
6. All ready, create a new PHP project, which can be found in your Apache, and then create a new PHP page, write a piece of code, plus a few breakpoints, and then right-click on the PHP page select Debug as Phpscript can see the familiar debug window, You can see the list of variables, the value of Post,get, and so on.
http://www.bkjia.com/PHPjc/781031.html www.bkjia.com true http://www.bkjia.com/PHPjc/781031.html techarticle 1. Download Eclipse, find it on the official website, and verify that the current system has a Java environment, the JDK and the JRE. 2. Install PDT, using the online installation, update the address in the default already package ...