I'm going to learn PHP today, and I'm using eclipse as I know it. For the configuration of the PHP environment and debugging configuration, I spent a lot of effort to study Kazakhstan, the following is sorted out the method:
1. Install and configure PDT
Download pdt:download.eclipse.org/tools/pdt/downloads/index.php, select the latest version
PDT is a plug-in for eclipse.
Select the Pdt-all-in-one version, otherwise you will need to download eclipse and related plug-ins separately and integrate them manually.
2. Install the Debug environment
Because I used the latest xampp1.7.2, tried two days Xdebug, appeared as the title: Waiting for Xdebug session, stopped 57% progress, the program can not debug. May be the problem between Xdebug and php5.3. Therefore, the decision to switch to the old version of Xampp1.6.8,php is 5.2.6. The result still appeared the above problem, let me not its solution, cannot, change Zend debugger.
XAMPP version 1.6.8, download Zend Debugger 5.2.x from here. Unzip the file and copy it to the Xamppphpext directory.
Open the php.ini in the Xamppapachebin directory. The last additions:
Zend_extension_ts = "C:xamppphpextzenddebugger.dll"
zend_debugger.allow_hosts=127.0.0.1/10,192.168.88.146
Zend_debugger.expose_remotely=always
Where 192.168.88.146 is the IP address on your machine.
3. Setting the debug environment under PDT
Start Eclipse, and set the code directory to "Xampphtdocs" so that it is placed directly under the Apache web directory
Open Window > Preferences > PHP from the Main menu,
First select the "PHP excutables" node, on the right side of the panel point "Add" button, in the next window,
Select the Debug node, and in the right panel,
"PHP Debugger" select Xdebug,
"Server" does not change
"PHP executable" also choose the "xampp-zend" you just added.
You can click the icon in the debug view or use a shortcut key to step through the PHP debug perspective, such as:
F5: Step-hop (you can jump into the require () function to track to other php files yo)
F6: Single Step Skip
F7: Stepping Out (you can jump back to the caller from the file being require ())
F8: Continue execution (until the next breakpoint is encountered)
Ctrl+r: Execution to the line where the cursor is located (unless a breakpoint is encountered)