簡體   English   中英

使用NetBeans / XDebug調試Zend Framework項目

[英]Debugging Zend Framework project with NetBeans / XDebug

有人能夠設置Zend Framework項目的NetBeans調試嗎? 我的計算機以及NetBeans 6.8都在本地運行XAMPP。 從phpinfo()的外觀來看,XDebug已正確安裝在XAMPP上。 我開始使用NetBeans調試會話,它連接到XDebug並打開頁面,但是它不會在任何斷點處停止。

如果您有興趣,請摘錄自NetBeans日志:

<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"      command="step_into" transaction_id="165" status="stopping" reason="ok"></response>
FINE [org.netbeans.modules.php.dbgp.ServerThread]
java.net.SocketTimeoutException: Accept timed out
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(Unknown Source)
        at java.net.ServerSocket.implAccept(Unknown Source)
        at java.net.ServerSocket.accept(Unknown Source)
        at org.netbeans.modules.php.dbgp.ServerThread.run(ServerThread.java:47)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[catch] at java.lang.Thread.run(Unknown Source)

這個超時看起來很可疑,但是我不確定是否是引起問題的原因。

這是我的php.ini配置的摘錄:

extension=php_xdebug-2.0.5-5.3-vc6.dll
xdebug.extended_info = 1
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000

你有什么建議嗎?

我已經解決了 問題在於必須通過Zend Extension Manager(而不是通過常規的PHP擴展)啟用XDebug,並且XAMPP 1.7.2(我擁有的)中沒有Zend Extension Manager。 我降級到XAMPP 1.7.0,它起作用了。 我還必須禁用Zend Optimizer並下載XDebug的較新版本。 這是我的最終PHP配置:

[Zend]
zend_extension_ts = "\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "\xampp\php\zendOptimizer\lib\Optimizer"
;zend_optimizer.enable_loader = 1
;zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="\xampp\php\ext\php_xdebug-2.0.5-5.2.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="\xampp\tmp"
xdebug.idekey = "netbeans-xdebug"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM