PHP development environment is relatively good configuration, but PHP debugging environment is more difficult to match, mainly php5.3 introduced a more secure mechanism, so that the original Zend debug compatibility is not so good, so use Xdebug to debug. In accordance with the online tutorials are done, the results of the problem is not resolved, tossing a day, changed the machine, also changed several integrated development environment, the problem has not been solved, in debugging PHP with Xdebug, appeared 57% waiting for Xdebug session problem, Baidu, Google, 360 a lot of, the Internet is not said to be the default port occupies 9000 problem, that is, the browser setup problem, there is debugging directory is not the actual directory of files, these three problems have not solved their own problems encountered.
Online also said that when using phpinfo () appears the following Xdebug two interface information, even if successful, it is not, because each time this interface will appear, the two interfaces are as follows:
One
Two
Odd of the strange, their own steps in accordance with their tutorials, or error problems can not be resolved. Finally, I calm down, finally solved the problem.
Now summarize the whole process as follows.
One, the integration development environment choice. Select eclipse PDT 3.0.x all in Ones, which can be downloaded at Eclipse's official PDT, linked to the Zend home page.
Prior to using the EPP 3.0 (PHP100 with PDT and eclipse as the basis for a development environment, the EPP 1.22 version can be pre-implementation of PHP, and highlight the PHP function code, and 3.0 can not be pre-executed or highlighted, writing code is very inconvenient. When using Zend Studio is also not highlighted, maybe I did not set it, anyway, is not. )
Second, the operating environment choice. Php+mysql+apache+xdebug
(The XAMPP 1.8.1 integrated environment contains these software, the corresponding version is
Apache 2.4.3 MySQL 5.5.27 PHP 5.4.7 phpMyAdmin 3.5.2.2 FileZilla FTP Server 0.9.41 Tomcat 7.0.30 (with MOD_PROXY_AJP as Co Nnector) Strawberry Perl 5.16.1.1 Portable XAMPP Control Panel 3.1.0 (from hackattack142)
Through the XAMPP Control Panel better operation of course also can choose to use WAMPP integration environment, the two are similar)
Of course, if you want to study, you can download PHP, MySQL, Apache and Xdebug to complete the installation. Since the version of Xampp 1.68 comes with the xdebug, you only need to turn it on.
Third, configure php.ini, open Xdebug.
[xdebug]zend_extension = "D:\xampp\php\ext\php_xdebug.dll" xdebug.profiler_append = 1xdebug.profiler_enable = 1xdebug.profiler_enable_trigger = 1xdebug.profiler_output_dir = "D:\xampp\tmp" Xdebug.profiler_output_name = " cachegrind.out.%t-%s "xdebug.remote_enable = 1xdebug.remote_handler =" DBGP "xdebug.remote_host =" 127.0.0.1 " Xdebug.trace_output_dir = "D:\xampp\tmp"
Note that the above are written according to the requirements, should be opened, the place is 0 to change to 1, rather than just remove the ";" Yes, the main reason for personal error is here.
Iv. configuration of Eclipse.
Turn on Windows, Preferences, PHP->php executables join Xdebug
Turn on PHP->debug, Windows-Preferences, and configure the following
The Debug configuration is then configured as follows:
The following debugging succeeded after the interface is as follows:
Done!