2010-02-13 105 views
0

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

這是從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 

你有什麼建議嗎?

回答

2

我解決了它。問題是XDebug必須通過Zend Extension Manager啓用(不是通過普通的PHP擴展),並且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" 
相關問題