2011-05-27 49 views
3

我嘗試配置XDebug的工作,但沒有工作,我用:的XDebug在XAMPP不NetBeans上

XAMPP 1.7.4 , Netbeans 7.0 
Xdebug installed: 2.1.0rc1 
Server API: Apache 2.0 Handler 
Windows: yes - Compiler: MS VC6 - Architecture: x86 
Zend Server: no 
PHP Version: 5.3.5 
Zend API nr: 220090626 
PHP API nr: 20090626 
Debug Build: no 
Thread Safe Build: yes 
Configuration File Path: C:\WINDOWS 
Configuration File: C:\xampp\php\php.ini 
Extensions directory: C:\xampp\php\ext 

而且php.ini

zend_extension = "C:\xampp\php\ext\php_xdebug.dll" 
xdebug.collect_includes = 1 
xdebug.collect_params = 1 
xdebug.collect_return = 1 
xdebug.default_enable = 1 
xdebug.extended_info = 1 
xdebug.profiler_append = 0 
xdebug.profiler_enable = 1 
xdebug.profiler_enable_trigger = 0 
xdebug.profiler_output_dir = "C:\xampp\tmp" 
xdebug.remote_autostart = 1 
xdebug.remote_enable = 1 
xdebug.remote_handler = "DBGp" 
xdebug.remote_host = "localhost" 
xdebug.remote_port = 9000 

現在的問題:

菜單附加調試器仍然被禁用或變灰。

當我嘗試調試中斷點時從來沒有命中。腳本像普通的一樣運行。

以下是URL我得到當我點擊Debug main project

http://localhost/index.php?XDEBUG_SESSION_START=netbeans-xdebug

當我關閉瀏覽器,調試器不會停止。它顯示waiting for connection狀態。

當我點擊NetBeans中的停止調試按鈕給出一個消息框There is no connection from xdebug detected with in some seconds未配置xdebug或未安裝xdebug。

請指導我解決上述問題並調試項目。

回答

0

?使用了XDebug的NetBeans & XAMPP

  • 使用http://xdebug.org/wizard.php檢查您的系統,並下載最好xdebug.dll

  • 的地方,在C .dll文件:/ XAMPP/PHP /分機

  • 編輯C:/xampp/php/php.ini添加以下

[XDebug] zend_extension = C:\xampp\php\ext\php_xdebug-2.2.3-5.5-vc11.dll xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.show_local_vars=on xdebug.output_buffering=off

  • 重啓Apache Web服務器

我掙扎了很多其他的設置,但是這是最好做的工作