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
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.