星期日, 四月 02, 2006

PHP Eclipse 安裝

PHP Eclipse 安裝筆記:

所需軟體:

  • XAMPP http://www.apachefriends.org/en/xampp.html
  • Eclpse.org http://www.eclipse.org/

Eclipse 就照預設安裝, XAMPP 將 XAMPP 裝在 D:\XAMPP 中.

開啟 Eclipse後 選

Help -> Soft Update -> Find and install -> Search for new Feture to install -> New Remote Site

輸入以下:

  • Name: PHPeclipse
  • URL: http://phpeclipse.sourceforge.net/update/cvs

詳細安裝法可見 Using PHPEclipse : Installation : Installing the DBG Debugger

以下是自己做的簡易 php dbg 安裝筆記

dbg download: http://dd.cron.ru/dbg/downloads.php

抓 DBG 2.13.1 dbg modules(裡面有各種 PHP 版本的 DLL), 解壓縮後, 在 i686 的檔案中找到 php_dbg.dll-[PHP-version], 再將名字改為 php_dbg.dll 即可.

再來照以下步驟:

  1. 將 php_dbg.dll 拷到 D:\XAMPP\xampp\php\ext
  2. gvim D:\XAMPP\xampp\apache\bin\php.ini
  3. implicit_flush = Off => 改為 on
  4. eaccelerator.enable="1" => 改為 0 (可以不改)
  5. 在檔案的最後加入以下
    [debugger]
    extension=php_dbg.dll
    debugger.enabled=on
    debugger.profiler_enabled=on
    debugger.hosts_allow=localhost
    debugger.hosts_deny=ALL
    debugger.ports=7869, 10000/16

重新啟動 apache.

再設定 debug 的環境.

  1. 於Eclipse 上面有隻小蟲蟲的圖, 點右邊的下拉鍵頭 -> 選 Debug -> PHP DBG Script -> New
  2. 於 Name 寫 PHPDebug, 再來點 Enviroment -> New -> D:\XAMPP\xampp\php\php.exe
  3. 再點 Remote Debug -> 勾選 Remote Debug 再點選下放 Debug(同確認的意思)

於程式中設定 Debug point: 在要設定的地方最左邊用滑鼠點兩下即可(不知要用哪個快速鍵)

按 F11 就會進入 Debug 的畫面

於 Debug 的畫面時, F8 是執行下一步(一步一步執行)的意思, F6 是執行下一個 Debug 的 Point (點上面的 Run 會說明有哪些快速鍵可以使用)

相關標籤

this is comment icon Thanks [回覆]

Thanks a lot!

Comment by 布丁求敗 (04/20/2006 23:51)

this is comment icon 我初学php,出现如下错误,是怎么回事呢,希望您能解答 [回覆]

Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost 08/15/07 15:42:09 Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3
Comment by (08/15/2007 15:40)

this is comment icon 回 無名氏 XD [回覆]

您的問題在於找不到檔案, 只要把檔案擺在 web 的根目錄下, 就可以存取到.
但是我對您的環境等等資訊都不清楚, 所以不曉得該怎麼幫您耶.

Comment by Tsung (08/15/2007 18:21)
Add this page to del.icio.us Add this page to Yahoo Taiwan's bookmark Add this page to MyShare

發表迴響

標題

內容 (限制 1000 字)

暱稱

電子郵件

個人網頁


 authimage


PS: 若無法留言, 請先確認是否有打開 JavaScript, 造成您的困擾, 實在萬分對不起 Orz...(如果無法留言, 勞煩可以發信給我好嗎? 謝謝.)
PS2: 若您的留言被誤判, 我都會再自行看過, 不需要一直重覆張貼~