Search code examples
phpwindowsapachenetbeansxdebug

netbeans shows "Waiting For Connection (netbeans-xdebug)"


I need help to configure xdebug, for debugging projects from IDE netbeans.

These are the features of my components:

XAMPP 1.8.2

PHP: 5.4.16

netbeans: 7.3.1

Apache: 2.4.4 (Win32)

this is the final part of my php.ini file:

 [XDebug]
 zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9-nts.dll"
 ;xdebug.profiler_append = 0
 ;xdebug.profiler_enable = 1
 ;xdebug.profiler_enable_trigger = 0
 xdebug.profiler_output_dir = "C:\xampp\tmp"
 ;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
 xdebug.remote_enable = 1
 xdebug.remote_handler = "dbgp"
 xdebug.remote_host = "127.0.0.1"
 ;xdebug.trace_output_dir = "C:\xampp\tmp"

when I run phpinfo(), there is no xdebug installed, and when I debug a project from netbeans, it says "Waiting For Connection (netbeans-xdebug)".

can someone help me to configure it?


Solution

  • Have you rectified the issue ? If not then please try this.

    1.) php.ini file content

    [xDebug]
    zend_extension = "c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
    xdebug.remote_autostart=on
    xdebug.remote_enable=on
    xdebug.remote_enable=1
    xdebug.remote_handler="dbgp"
    ;xdebug.remote_host="localhost:81"
    xdebug.remote_host=192.168.1.5
    ;xdebug.remote_connect_back=1
    xdebug.remote_port=9000
    xdebug.remote_mode=req
    xdebug.idekey="netbeans-xdebug"
    

    xdebug.remote_host=192.168.1.5 - This is the IPv4 address of my system, I changed to this because I couldn't debug with localhost and 127.0.0.1.

    in NetBeans IDE, open Tools-> Options -> PHP -> Debugging. The values of debugger port and Session Id should match with the port and idekey specified in php.ini.

    Now save php.ini, restart Apache and try to debug.

    Thanks Johnson