How to configure and debug your PHP environment
Today I want to learn PHP, tools or use my familiar eclipse. For the configuration of the PHP environment and debugging configuration, I took a lot of effort to study ha, the following is the method of sorting out:
1. Installing and configuring PDT
Download pdt:download.eclipse.org/tools/pdt/downloads/index.php, select the latest version
PDT is a plugin for eclipse.
Select the Pdt-all-in-one version, otherwise you will need to download eclipse and related plugins separately, and manually integrate them.
2. Installing the Debug environment
Because I use the latest xampp1.7.2, tried for two days xdebug, appeared as follows title: Waiting for Xdebug session, stopped the progress of 57%, the program cannot debug. May be the problem between Xdebug and php5.3. So the decision to switch to the older version of xampp1.6.8,php is 5.2.6. The result still appeared above problem, let me not its solution, not to, replace Zend Debugger.
XAMPP version 1.6.8, download Zend Debugger 5.2.x from here. Unzip the file and copy it to the \xampp\php\ext directory.
Open the php.ini in the \xampp\apache\bin directory. The last additions:
Zend_extension_ts = "C:\xampp\php\ext\ZendDebugger.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. Set the debug environment under PDT
Start Eclipse and set the code directory to "Xampp\htdocs" so that it is placed directly under Apache's 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" that you just added
In the PHP debug perspective, you can click on the icon in the Debug view or use the shortcut key to step through it, such as:
F5: Stepping in (you can jump into the require () function to track other PHP files)
F6: one-step skip
F7: Step Out (You can jump back to the caller from the file being require ())
F8: Continue execution (until the next breakpoint is encountered)
Ctrl+r: Executes to the line where the cursor is located (unless a breakpoint is encountered)
http://www.bkjia.com/PHPjc/847209.html www.bkjia.com true http://www.bkjia.com/PHPjc/847209.html techarticle PHP Environment Configuration and debugging methods to learn PHP today, tools or use my familiar eclipse. For the configuration of the PHP environment and debugging configuration, I spent a lot of effort to study ha, to ...