A good IDE can make your work more effective, I used a lot of PHP for the IDE, code editing and auto-complete function of all good, but most of the aspects of debugging code IDE is very weak, with the best Should be the Zend Studio, and through the integration of the Zend Platform, the perfect realization of the remote debugging feature, especially with the Firefox plug-ins so that you can facilitate in the Zend Studio is debugging in the browser page, very humane. But the shortcomings of Zend Studio is also very clear that it is a commercial software, and Zend Platform will be installed in the system of registration of a number of services, including a MySQL database services, as a result can only run a MySQL services, at this time if you want to XAMPP such as the use of AMP (Apache, MySQL, PHP) to install integrated package will be a problem.

So how to set up Windows on a very good, very powerful debugging PHP development environment? After several attempts, my solution is: WampServer + xdebug + PDT (PHP Development Tools), the installation steps are as follows:

1, download the latest version of WampServer. Download Address: http://www.wampserver.com/en/download.php;

2, installation WampServer. My position is to install "D: \ PHP \ wamp". During the installation process, will let you set up PHP's mail () function required information, including the SMTP server, and so on, only the right to set these parameters, we can use PHP to send e-mail. Here you can use the mail service provided by the SMTP service, or a locally installed its own SMTP server, I used the 1st SMTP Server.

3, will be added to the xdebug in WampServer. From http://xdebug.org/ corresponds to download WampServer used by the PHP version of the module xdebug, I was the PHP 5.2.1-5.2.7. Will be available down the php_xdebug-2.0.2-5.2.5.dll to copy D: \ PHP \ wamp \ bin \ php \ php5.2.5 \ ext, re-named php_xdebug.dll. In D: \ PHP \ wamp under the new directory xdebug, used to store the xdebug output file. PHP modify configuration files D: \ PHP \ wamp \ bin \ apache \ apache2.2.6 \ bin \ php.ini, in the final document by adding the following:

[Xdebug]
zend_extension_ts = "D: / PHP/wamp/bin/php/php5.2.5/ext/php_xdebug.dll"
xdebug.auto_trace = On
xdebug.collect_params = On
xdebug.collect_return = On
xdebug.trace_output_dir = "D: / PHP / wamp / xdebug"
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "D: / PHP / wamp / xdebug"
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_log = "D: / PHP / wamp / xdebug / xdebug.txt"

Xdebug settings that have the specific meaning of the various parameters.

Save profile. Start WampServer, in a browser to open http://localhost/?phpinfo=1, confirmed xdebug module has been successfully loaded.

4, from http://downloads.zend.com/pdt/all-in-one/ download the latest version of PDT, I chose the version 1.0.2 win32. To download the compressed files to D: \ PHP \ pdt.

5, from http://downloads.zend.com/pdt/debugger/ download the latest PHP debug plug-in, after extracting features and plugins folder to copy D: \ PHP \ pdt \, covering the original document Can be. PDT all in one already included in the plug-in, no longer a separate installation.

6, after the completion of the operation, you need to set up a number of PDT can be used to debug xdebug, this document, there are detailed instructions: http://www.eclipse.org/pdt/documents/XDebugGuide.pdf

Well, now you can have the same procedures as Java debugging PHP on procedures for local and remote debugging, is not that Henshuang. The use of remote debug mode, when a debugging process to start, will use the default browser to open the page you are debugging, you can click through pages of links to other pages on debugging, very convenient.

However, the use of the process, I discovered a problem, that is, in the Expressions of the contents of the array of 32 elements for a set of the show (for example, [0 ... 31], [32 ... 63], .. .) When you want to view elements of the array of more than 32, only to see Expressions in the first set of [0 ... 31] of the value of the element, the rest of the group are empty. Google in the last half a day to find the answer is no, I do not know whether anyone has noted that, or to find a solution.

Related articles

guide, IDE, PDT, xdebug.