Php environment configuration and debugging configuration _ PHP Tutorial

Source: Internet
Author: User
Tags download zend php debug php debugger
Php environment configuration and debugging configuration methods. Php environment configuration and debugging configuration method today I plan to learn PHP, the tool is still using eclipse I am familiar. I spent a lot of time studying the php environment configuration and debugging configuration methods.

I plan to learn PHP Today. the tool still uses eclipse that I am familiar. I have spent a lot of time studying the configuration and debugging of the php environment. the following methods are provided:

1. install and configure PDT

Download PDT: download.eclipse.org/tools/pdt/downloads/index.php and select the latest version.

PDT is the plug-in of Eclipse.

Select the pdt-all-in-one version. Otherwise, you need to download eclipse and related plug-ins and integrate them manually.

2. install the debug environment

Because I used the latest xampp1.7.2 and tried xdebug for two days, the following example is displayed: waiting for xdebug session. the program cannot be debugged because the process stops at 57%. It may be a problem between xdebug and php5.3. Therefore, we decided to use the old version xampp1.6.8 and php version 5.2.6. The above problem still occurs, so I cannot solve it. I cannot change it to zend debugger.

The xampp version is 1.6.8. Download zend debugger 5.2.x from here. Decompress the file and copy it to the \ xampp \ php \ ext directory.

Open php. ini in the \ xampp \ apache \ bin directory. To add:

Zend_extension_ts = "c: \ xampp \ php \ ext \ ZendDebugger. dll"

Zend_debugger.allow_hosts = maid/10,192.168 .88.146

Zend_debugger.expose_remotely = always

192.168.88.146 is the IP address on your computer.

3. set the debug environment under PDT

Start Eclipse and set the code directory to "xampp \ htdocs". In this way, the code is directly stored in the apache WEB directory.

Open "Window> Preferences> PHP" from the main menu ",

Select the "PHP Excutables" node and click "Add" on the right panel. in the following window,

Select the "Debug" node. on the right panel,

"PHP Debugger" select XDebug,

"Server" does not need to be changed

"PHP Executable" also selects the "xampp-zend" you just added"

In the PHP Debug perspective, you can click the icon in the Debug View or use a shortcut key to track a single step, for example:

F5: One-Step Jump (you can jump into the require () function to track other PHP files)

F6: Skip in one step

F7: One-Step Jump (you can jump back to the caller from the file being require)

F8: continue execution (until the next breakpoint is encountered)

Ctrl + R: execute to the row where the cursor is located (unless a breakpoint is encountered)

Parse plans to learn PHP Today. the tool still uses eclipse that I am familiar. I spent a lot of time studying the configuration and debugging of the php environment...

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.