Server debugging-Zend Debugger installation tutorial

Source: Internet
Author: User

Debugging technology is an indispensable part of our programming. debugger is a required component in every IDE environment. In this case, the integrated environment of Zend Studio has a debugger, which is a matter of course. However, when the debugger is configured and used, its powerful functions will surely surprise you!

In fact, the debugging functions of Zend Studio (hereinafter referred to as "ZDE") are divided into internal debugging and remote debugging. Internal debugging is a preliminary debugging of the code using ZDE's built-in PHP (with versions 4 and 5). We focus on remote debugging, because it can completely simulate a real running environment.


Remote debugging requires the support of components on the server side. The content of today is how to install the debugging environment on the server side. The debugging component used is Zend Debugger, Which is lightweight and sufficient, at the time of writing this article, the latest version is 5.2.14, which is slightly updated with the widely circulated version 5.2.10 on the Internet. My server is apache in windows, so I downloaded Zend debuggerof windows, and the compressed package is about 2.1m, and there is a readme.txt. I think it is necessary to read it:

Zend Debugger installation instructions
-------------
1. Locate ZendDebugger. so or ZendDebugger. dll file that is compiled for the correct version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x) in the appropriate directory.
2. Add the following line to the php. ini file:
Linux and Mac OS X: zend_extension =/full/path/to/ZendDebugger. so
Windows: zend_extension_ts =/full/path/to/ZendDebugger. dll
Windows non-tread safe: zend_extension =/full/path/to/ZendDebugger. dll

(*) The windows non-thread safe is used only with Zend Core 2.0

3. Add the following lines to the php. ini file:
Zend_debugger.allow_hosts = <ip_addresses>
Zend_debugger.expose_remotely = always


4. Place dummy. php file in the document root directory.
5. Restart web server.

 

The installation method has been described in detail here, so I will describe it again in an obscure language.


The following is a list of all files in the compressed package:
ZendDebugger-5.2.14RC9-cygwin_nt-i386md5
ZendDebugger-5.2.14RC9-cygwin_nt-i386Inventory.xml
ZendDebugger-5.2.14RC9-cygwin_nt-i3864_3_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i3864_3_x_compendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i3864_4_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i3864_4_x_compendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_0_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_0_x_compendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_1_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_1_x_compendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_2_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_2_x_compendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_2_x_nts_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i3865_2_x_nts_compendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386dummy.php
ZendDebugger-5.2.14RC9-cygwin_nt-i386README.txt

 

Decompress the appropriate Zend Debugger version corresponding to your current php version. My php version is 5.2.5, so I dragged 5_2_x_comp out (as for 5_2_x_nts_comp, it means non-tread safe. If you don't understand the specific purpose, you will not use it). I moved 5_2_x_compendDebugger.dll to D: release, replace the dummy. decompress php to the web root directory. Set apache DocumentRoot to D:/myserver/wwwroot, and copy dummy. php to D: myserverwwwroot, and then modify php. ini, added the following content:

Zend_extension_ts = D:/myserver/ZendDebugger/5_2_x/ZendDebugger. dll
Zend_debugger.allow_hosts = 127.0.0.1/32,192.168 .1.88/24
Zend_debugger.expose_remotely = always

 

Then restart apache. After a slight wait, we can enter phpinfo () to check whether it is successful or not?

Aha, it works well ~


 

Next, open ZDE, tool menu-> preferences, select the debugging tab, set the debugging mode to Server, and enter the web Server URL in the Debug Server URL. Here, the apache port is 8080, if it is the default port 80, You can omit it. OK. The setting is complete. OK ()


 


 

Select tool-> check the Debug Server connection. In the displayed dialog box, select Yes. The connection is successful.


 


 

Now, even if our Debug Server has been successfully installed, We will elaborate on how to use Zend Studio to Debug the Server.
 

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.