From: http://blog.csdn.net/wyyl1/archive/2011/06/07/6528718.aspx
Eclipse PHP plug-in (http://wiki.eclipse.org/PDT/Installation ):
Http://download.eclipse.org/tools/pdt/updates/2.2/milestones
Bytes -----------------------------------------------------------------------------------------
Http://www.wenhq.com/article/view_635.html
Breakpoint debugging is essential for software development. Here we will introduce the debugging configuration of PHP in the eclipse tool in ubuntu10.04.
I plan to configure zenddebugger for debugging. After the configuration is completed for a long time, the configuration is not successful, and zenddebugger does not take effect in phpinfo. It is found that it is a php5.3 problem and must be uninstalled first. This article describes how to use xdebug.
========================================================== ========= Begin
The software installation is too simple. Execute the following commands:
Sudo apt-Get install apache2
Sudo apt-Get install PhP5
Sudo apt-Get install php5-cli
Sudo apt-Get install php5-xdebug
PHP configuration:
PHP. INI contains three folders in/etc/PhP5/: apache2, CLI, and Conf. d. We should modify PHP under apache2 and CLI. ini. in Conf. d. There is an xdebug. the INI file records the xdebug file path.
Sudo gedit/etc/PhP5/apache2/PHP. ini
Sudo gedit/etc/PhP5/CLI/PHP. ini
Use the superuser permission to open the above two PHP. ini, and add the following code:
; Xdebug Configuration
[Xdebug]
Xdebug. remote_enable = 1
Xdebug_remote_host = "localhost"
Xdebug. remote_port = 9000
Xdebug. remote_handler = "dbgp"
Zend_extension =/usr/lib/PhP5/20090626 + LFS/xdebug. So
; Enable Automatic Tracking
Xdebug. auto_trace = on
; Enable exception tracking
Xdebug. show_exception_trace = on
; Enable Automatic Start of remote debugging
Xdebug. remote_autostart = on
; Enable remote debugging
Xdebug. remote_enable = on
; Collect Variables
Xdebug. collect_vars = on
; Collect return values
Xdebug. collect_return = on
; Collect Parameters
Xdebug. collect_params = on
Xdebug. collect_assignments = on
Bytes --------------------------------------------------------------------------------------
Http://techmania.wordpress.com/2008/07/02/debugging-php-in-eclipse-using-xdebug/
Add the following configuration in xdebug. ini:
Sudo gedit/etc/PhP5/CONF. d/xdebug. ini
Xdebug. remote_enable = on
Xdebug. remote_host = "localhost"
Xdebug. remote_port = 9000
Xdebug. remote_handler = "dbgp"
Restart Apache: sudo/etc/init. d/apache2 restart
Bytes --------------------------------------------------------------------------------------
Http://www.txstudy.com/wap.aspx? Nid = 2638 & cid = 11 & sp = 386
Prepare an eclipse Browser
Open eclipse, find window-> preferences-> General-> Web browser, and check whether there is any browser. If not, add it. Of course, it is Firefox.
Prepare running and debugging options
Window-> preferences-> PHP executables-> Add-> Settings are as follows:
PhP5/usr/bin/PhP5 (Be sure to select PhP5 here, not PHP, because we installed a php5-xdebug)
Continue to prepare debug (trouble)
====================================== End
Window-> preferences-> PHP-> Run/debug-> perspectives-> you can find the PHP script and PHP Web page, set their debug and run programs respectively.
After the PHP script is created, debug and run it.
Open Run-> open debug dialog, select the name and environment required for debugging, and check carefully.
Then you can perform one-step debugging.
Notes: I tried it on zendstudio8.9 ubuntu10.04. The configuration process is really troublesome !!! Just have a small tool, huh, huh ....
================== Begin
================== The end part has been verified by myself and is very easy to use !!!