2013-04-22 32 views
0

我嘗試使用xdebug,DBGp和Notepad ++進行調試時出現問題,因爲它從未打過我的斷點。我已經做了很多的搜索,並不能看到我錯了:使用xdebug無法使記事本++命中斷點

我已經配置了正確的端口,看着我的xdebug.log時,我可以看到,它似乎很高興:

Log opened at 2013-04-22 12:10:58 
I: Connecting to configured address/port: 127.0.0.1:8080. 
I: Connected to client. :-) 
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/Program%20Files%20%28x86%29/resources/appliance/download_agents.php" language="PHP" protocol_version="1.0" appid="2740" idekey="xdebug"><engine version="2.2.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init> 

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response> 

Log closed at 2013-04-22 12:10:58 

Log opened at 2013-04-22 12:11:19 
I: Connecting to configured address/port: 127.0.0.1:8080. 
I: Connected to client. :-) 
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/Program%20Files%20%28x86%29/resources/appliance/download_agents.php" language="PHP" protocol_version="1.0" appid="2740" idekey="xdebug"><engine version="2.2.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init> 

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response> 

Log closed at 2013-04-22 12:11:19 

然而,它似乎從來沒有達到斷點。

我已在文件download_agents.php DBG斷點,我輸入網址:

http://localhost:8080/download_agents.php?XDEBUG_SESSION_START=xdebug 

但它從來沒有擊中它。刷新導致一個新條目被添加到上述日誌文件,所以似乎連接。但Notepad ++中DBG的GUI沒有連接消息。

我的php.ini文件分錄如下:

[xdebug] 
zend_extension="C:\nginx\php\ext\php_xdebug-2.2.2-5.3-vc9.dll" 
xdebug.remote_enable=1 
xdebug.remote_handler=dbgp 
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=8080 
xdebug.remote_mode=req 
xdebug.idekey=default 
xdebug.remote_log="c:\tmp\xdebug\xdebug.log" 
xdebug.show_exception_trace=0 
xdebug.show_local_vars=9 
xdebug.show_mem_delta=0 
xdebug.trace_format=0 
xdebug.profiler_enable = 1 
xdebug.profiler_output_dir ="c:\tmp\xdebug" 

和DBG配置如下所示:

enter image description here

在遠程路徑和本地路徑指向根我的web應用程序並匹配xdebug.log文件中的輸出:

file:/// C:/ Program%20Files%20%28x86%29/resources/appliance/downlo ad_agents.php」

請任何援助將大大收到..

感謝

+0

你試過定義一個ide-key嗎?即'xdebug.idekey = myIDE0815'和'IDE KEY => myIDE0815' – Sammy 2013-04-22 12:25:29

+0

嗨,謝謝你的回覆。我已經添加了一個IDE密鑰,但這可以是任何你喜歡的東西嗎?無論如何不會有所作爲。 – Yos 2013-04-22 12:38:44

+0

可能值得一提的是,我將remote_port從9000更改爲8080,因爲這是我的PHP正在監聽的端口... – Yos 2013-04-22 12:46:48

回答

1

2應用程序:一個是服務器,另一個是Xdebug的(直到你重新設置爲dafault)。你必須告訴的是,你在哪裏得到那個錯誤信息或更好的如何拋出這個信息。如果它是Notepad ++,你可以嘗試更新/ Npp的乾淨安裝(只是爲了確保)。也許,你可以在詳細模式下啓動DBGp。另一個嘗試可能是使用filemon,希望你找到npp讀取一個XML。

+0

嗨,我打算把這個標記爲答案,因爲我認爲你已經告訴我我需要知道什麼,那是我的配置不正確。在嘗試使用記事本進行調試之前,我將不得不解決這個問題。謝謝你的幫助。 – Yos 2013-04-29 14:30:26

+1

歡迎您。再說一遍:你也可以使用eclipse:實際版本,php-plugin,去;-)也許你會在互聯網上找到更多關於這個的信息。如果你想花一些錢,phpStorm是一個真正的好果汁 - 並且是可支付的。祝你好運! – Sammy 2013-05-02 08:20:17