Windows 下 PHP 開發環境配置系列三 – eclipse PDT + Zend Debugger 調試Web 專案

來源:互聯網
上載者:User

基本安裝參考

http://blog.csdn.net/oscar999/article/details/6713666

此部分只是介紹如何在PDT 下如何使用Zend Debugger  .php 的web 檔案

1. 解壓下載的Zend Debugger壓縮檔。

   1.1)  把5_2_x_comp下的ZendDebugger.dll拷到php安裝目錄(例如 D:\php。 根據php的安裝版本使用對應的ZendDebugger版本)

   1.2)  把dummy.php拷到網站根目錄下面(例如: D:\apache2\htdocs)

2.   開啟php.ini,在檔案的最後面加上

[Zend Debugger]
zend_extension_ts="D:/php/ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=allowed_hosts

說明: zend_debugger.allow_hosts最好使用機器的IP地址(可以在cmd 在使用ipconfig /all 查看)

以上Zend debugger安裝完成,可以通過phpinfo函數查看是否安裝成功。

建立phpinfo.php 檔案放在網站目錄下,重啟web server. 訪問這個檔案

<?phpphpinfo();?>

如果找到以下內容, 就說明安裝成功了 (需貼圖)

Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Debugger v5.2.15, Copyright (c) 1999-2008, by Zend Technologies

接下來就是如何在eclipse 中調試了

1. 點擊bug 表徵圖,選Debug Configurations

2. 雙擊 PHP Web Page--> New_configuration

3. 點configure... 配置正確的IP和連接埠

4. 選需要debug 的File

5. 點擊Test Debugger, 出現 "success"彈出框說明成功了。

6. F6 進行調試

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.