2012-01-21 30 views
2

我已經安裝了NetBeans 7.0.1 IDE,在Windows 7 64位運行。我已經通過XAMPP 1.7.2安裝了PHP。運行phpinfo()顯示PHP版本爲5.3.1和XDebug版本爲2.0.6-dev無法在Netbeans的運行PHP調試 - XDebug的

netbeans.org一個網頁已經提到了一些條目的php.ini文件的註釋去掉,並提到,兼容XDebug.dll已經提供了設置。 這些都是從的php.ini文件條目...

[PECL] 
zend_extension = "C:\xampp\php\ext\php_xdebug.dll" 

[XDebug] 
xdebug.remote_port = 9000 
xdebug.remote_host = 127.0.0.1 
xdebug.remote_handler = "dbgp" 
xdebug.remote_enable = 1 
xdebug.profiler_enable = 0 
xdebug.profiler_append = 0 
xdebug.profiler_enable_trigger = 0 
xdebug.profiler_output_name = "xdebug_profile.%p" 
xdebug.profiler_output_dir = "C:\xampp\tmp" 
xdebug.trace_output_dir = "C:\xampp\tmp" 
xdebug.idekey = "netbeans-xdebug" 

繼承人是從NetBeans IDE中的調試器配置的快照。 enter image description here

會話調試窗口不顯示於NetBeans XDebug的會話運行。 enter image description here

完成所有這些設置後,調試器仍未運行。

我檢查了端口使用TCPView它顯示端口9000是免費的。此外防火牆被禁用。

請幫忙嗎?

回答

0
[zend] 
zend_extension = "path_to_xdebug" 
xdebug.remote_enable=On 
xdebug.remote_host="localhost" 
xdebug.remote_port=9000 
xdebug.remote_handler="dbgp" 
xdebug.profiler_enable = On 
xdebug.profiler_output_dir = C:\Windows\temp 
xdebug.dump_globals=On 
xdebug.show_exception_trace=On 
xdebug.collect_params=4 

試試這個。保存php.ini。重新啓動電腦。

+0

OK。除此之外,我必須在Netbeans中做些什麼改變? –

+0

它必須工作。如果您需要個人幫助,請通過skype與我聯繫:tural.teyyuboglu –

0

我知道這個問題很舊,但是我有類似的問題,除了我在Ubuntu上,我的設置與您的設置完全相同。我可以通過在Netbeans中簡單地創建一個PHP項目來實現它的工作;顯然你不能調試一個文件。

通過執行File-> New Project,您可以從現有代碼庫創建項目,甚至將項目元數據存儲在其他地方。

這裏是我的php.ini文件中的一個片段:

[xdebug] 
zend_extension=xdebug.so 
xdebug.remote_enable=1 
xdebug.remote_host=localhost 
xdebug.remote_port=9000 
xdebug.remote_handler="dbgp" 
xdebug.profiler_enable = On 
xdebug.profiler_output_dir = /tmp 
xdebug.dump_globals=On 
xdebug.show_exception_trace=On 
xdebug.collect_params=4 

確保您重新啓動服務器和Netbeans編輯php.ini之後。 OK。