問題描述
我已經安裝了 Xdebug,我可以從 phpinfo()
確認它已正確安裝.我已經采取了所有在我 google
netbeans xdebug 安裝等"中提出的網站中給出的所有步驟.
I have installed Xdebug, and I can confirm from phpinfo()
that it is correctly installed. I have taken all the steps given in all of the sites that come up with I google
"netbeans xdebug install, etc".
它在 Netbeans 中仍然不起作用.有人可以提供任何建議嗎?
It still does not work in Netbeans. Is there any advice that someone can offer?
這是我的 php.ini 調試部分...
Here is my php.ini debug section...
[xdebug]
zend_extension = /usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_mode = "req"
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey = "netbeans-xdebug"
任何幫助將不勝感激!
推薦答案
由于我能得到的信息非常稀少,我必須更詳細地描述設置.
Since the information available to me is very sparse, I have to describe the settings in more detail.
Netbeans 和 xdebug 設置.
Ubuntu 12.04 LTS 精確穿山甲
Ubuntu 12.04 LTS Precise Pangolin
應該安裝什么.
全局設置:
工具 -- 選項
PHP 設置:
使用 phpinfo() 你會得到.. 見下圖.
With phpinfo() you get.. see below image.
只有一個 php.ini 很重要!查看加載的配置文件如果您將 xdebug 條目寫入另一個php.ini"文件,請確保再次清除所有這些條目.( xdebug 僅在一個 php.ini 中).另請查看解析的其他 .ini 文件.我們稍后再談.
Only one php.ini is important ! Look at Loaded Configuration File If you wrote a xdebug entry into another "php.ini" file be sure to clear all these entries again. ( xdebug ONLY in one php.ini ). Look also at Additional .ini files parsed. We come to this later.
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
已解析其他 .ini 文件.
添加或控制,只有第一行必須與php.ini"中的相同.(沒有")
Additional .ini files parsed.
Add or controlling, only the first line must be the same as in the "php.ini".( Without " " )
確保文件確實在那里!
確保 session.save_path 確實存在!
控制 xdebug 版本應該等于或更高.(匹配 PHP 版本 5.3.10-1).如果一切都按照本答案中的描述完成,但它不起作用,那么很可能不正確或有缺陷xdebug.so".
Control the xdebug version that should be equal to or greater.( Matching PHP Version-5.3.10-1 ). If everything was done as described in this answer, and it does not work, then it is with great probability of an incorrect or defective "xdebug.so".
創建一個新的 PHP 項目:
項目屬性:
來源
在我們的測試程序中,重要項目文件夾和源文件夾完全相同!
Project Properties:
Sources
In our test program, it is important the Project Folder and Source Folder are exactly alike!
運行配置
開始調試: -- 按下調試按鈕
當 Netbeans 處于調試模式時,默認瀏覽器會打開并保持在 正在連接 .. 狀態.
(如果 Netbeans 沒有打開瀏覽器或無法連接,請返回高級 Web 配置并選擇不要打開 Web 瀏覽器.關閉并重新打開瀏覽器并輸入 URL如下所示)
The default Browser opens and remains at Connecting .. stand while Netbeans in debug mode is.
(If Netbeans do not open a Browser or can not connect, go back to Advanced Web Configuration and select Do Not Open Web Browser. Close an reopen the browser and type the URL as seen below)
檢查您的代碼.完成調試后,您將只在瀏覽器中看到一些內容.不要忘記按下停止按鈕 .如果你忘記了這個 xdebug 正在運行.
Go through your code. You will see only something in the browser when you're done with the debugging. Don't forget to press the Stop Button . If you forget this xdebug is running on.
完成:
這篇關于Linux 中的 Netbeans 和 Xdebug的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!