PHP——实现Zend Debug

来源:互联网 发布:怎么上淘宝精品推荐 编辑:程序博客网 时间:2024/04/29 21:39

zend debugger下载地址:

http://downloads.zend.com/pdt/server-debugger/ZendDebugger-5.2.15-cygwin_nt-i386.zip

 

Zend Debugger installation instructions
---------------------------------------

1. Extract the Zend Debugger package.

2. Locate the ZendDebugger.so (Unix) or ZendDebugger.dll (Windows) file in the directory which
   corresponds to your version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x).

2. Add the following line to your 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-thread safe: zend_extension=<full_path_to_ZendDebugger.dll>
   (*) The Windows non-thread safe binary is only used with Zend Core 2.0.
  
3. Add the following lines to your php.ini file:
   zend_debugger.allow_hosts=<host_ip_addresses> IP地址用逗号隔开
   zend_debugger.expose_remotely=always

   (*) hopst_ip_addresses are the IPs of the hosts which will be allowed to initiate debug sessions

4. Copy the dummy.php file to your document root directory.

5. Restart your Web server.

 

以上英文相当简单

就不翻译了

有一点注意

5_2_x_nts_comp

中的nts意思为 no-thread-safe

 

设置完zend debugger后,回到eclipse中,选择Window-Preferences-php-php executables里面添加一条记录,指向你的php安装目录;

设置完毕以上事项后,在eclipse中,选择Help-Help Contents-PDT User Guide-Getting Started-Basic Tutorials-Working with the Debugger,请参照此文档学习如何在该环境下调试php代码,需要提醒注意的是在进行php web程序调试的时候,一定要把工程文件复制到apache服务器目录下,并且做好与本地文件之间的对应关系,这样一旦开始进入调试模式,调试器才能找到源代码。

原创粉丝点击