PHP Development Environment Build (Eclipse PDT XAMPP XDEBUG) ____php

Source: Internet
Author: User
Tags php debugger php development environment phpinfo
PHP Development Environment (Eclipse PDT XAMPP XDEBUG)

1. Download and install the configuration xampp
Run Xampp-control.exe, start Apache

Visit http://localhost/xampp/phpinfo.php
You can see that the PHP configuration file that Apache uses is:%xampp%\apache\bin\php.ini
Open PHP.ini and add the following configuration information at the end to enable Xdebug
; loading into Xdebug
Zend_extension_ts= "%xampp%/php/ext/php_xdebug.dll"

; Xdebug Configuration
[Xdebug]
; Turn on automatic tracking
Xdebug.auto_trace = On
; Turn on exception tracking
Xdebug.show_exception_trace = On
; Turn on remote debugging to start automatically
Xdebug.remote_autostart = On
; Turn on 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

Restart Apache, and then refresh the phpinfo.php page, if you can see XDebug information, the configuration is successful

2. Installation configuration Eclipse plug-in pdt3.0.0v20110516
Open Window-> perference-> php->php Executables
Add a executable:
name:php5.3.8
Executable Path:%xampp%\php\php.exe
PHP INI file:%xampp%\apache\bin\php.ini
PHP Debugger:xdebug

Open Window-> perference-> php->debug, setting:
PHP Debuger:xdegug
Server:default
PHP executable:php5.3.8
Uncheck "Break at the"

3. Debug PHP Project

Create a new project Phpproject and create a new index.php, enter the appropriate PHP code, and then set a breakpoint

Open Apache config file httpd.conf, add at the end
Alias/phpproject%workspace%/phpproject/
alias/phpproject/%workspace%/phpproject/
<directory "%workspace%/phpproject/" >
Options Indexes followsymlinks Includes execcgi
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
Restart Apache
Back to eclipse PDT, right-click index.php, select Debug as--> php Web Page to debug breakpoints
Encountered a Web Launch already running error: Because debug requires an explicit end, click the Stop button in the Debug view

Modify Port: httpd.conf Listen 80, modify 80 to New port

http://blog.csdn.net/zhoudaxia/article/details/5271250
http://laochake.iteye.com/blog/323958
Http://www.latenightpc.com/blog/archives/2008/05/24/a-complete-lamp-development-environment-xampp-eclipse-pdt-and-xdebug
Related Article

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.