2013-06-29 109 views
1

我正在使用Netbeans來完成我的項目(codeigniter),我的xdebug是在php ini中配置的。以下是設置:xdebug不會激活斷點

 
zend_extension = "C:\xampp\php\ext\php_xdebug.dll" 
;xdebug.profiler_append = 0 
;xdebug.profiler_enable = 1 
;xdebug.profiler_enable_trigger = 0 
;xdebug.profiler_output_dir = "C:\xampp\tmp" 
;xdebug.profiler_output_name = "cachegrind.out.%t-%s" 
xdebug.remote_enable = 1 
xdebug.remote_handler = "dbgp" 
xdebug.remote_host = "127.0.0.1" 
xdebug.remote_autostart = 1 
xdebug.idekey = "netbeans-xdebug" 
xdebug.remote_log="C:\xampp\tmp\xdebug.log" 
xdebug.remote_port=9001 

Php info顯示xdebug已激活。我在login方法中設置變量的斷點並開始調試。出現在登錄頁面的鏈接:?

本地主機/ goldilock/index.php的XDEBUG_SESSION_START =於NetBeans XDebug的

後登錄在,斷點不被激活,我不能調試和XDEBUG_SESSION_START = netbeans-鏈接的xdebug部分消失。

有什麼方法可以激活調試。我找不到任何解決方案來將調試器激活到斷點。

的xdebug.log說以下內容:

所有的
 
Log opened at 2013-07-01 05:40:22 
I: Connecting to configured address/port: 127.0.0.1:9000. 
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:23 

Log opened at 2013-07-01 05:40:35 
I: Connecting to configured address/port: 127.0.0.1:9000. 
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:36 

Log opened at 2013-07-01 05:40:38 
I: Connecting to configured address/port: 127.0.0.1:9000. 
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:39 

Log opened at 2013-07-01 05:40:39 
I: Connecting to configured address/port: 127.0.0.1:9000. 
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:40 

回答

0

這就是我與德里克的答案的幫助:

步驟1:更改xdebug.remote_port = 9000 xdebug.remote_port = 9001

第2步:

  1. 更改在Netbeans中調試端口。轉到工具>>選項>>點擊PHP選項卡
  2. 在PHP選項卡中單擊調試
  3. 更改調試端口:9001
  4. 更改會話ID:於NetBeans XDebug的

第3步:重新啓動服務器netbeans

第4步:設置斷點並嘗試

+1

幾天後,試圖讓xdebug連接到Netbeans,這救了我。謝謝bro – 2014-03-06 03:29:51

+0

不客氣的David Tay – madi

1

首先,你需要打開xdebug.remote_enable=1 - 不這樣做,調試未激活,它不會工作。

對於第一次「登錄」後的請求,xdebug.remote_autostart應該處理該請求,但Netbeans可能不接受新的傳入調試連接。要了解Xdebug正在嘗試做什麼,請添加設置xdebug.remote_log=c:\temp\xdebug.log並調查日誌中的內容。 (您可能需要更改路徑)。

+0

我編輯了這個問題。請幫我解釋日誌。謝謝。 – madi