PHP Environment Configuration and Debugging configuration method

Source: Internet
Author: User
Tags download zend learn php php debug php debugger require zend

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)

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.