2
votes

I am using Windows7 of 64 BIT. My PHP version is 5.6.3 (got this using phpinfo();). I am trying to use XDebug with NetBeans. My Netbeans version is 8.0.2. My Xdebug section of phpinfo(); is as below.

enter image description here

I placed below code in php.ini file and restarted Apache as well.

[XDebug]
zend_extension = "D:\XAMPP\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\XAMPP\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host=192.168.1.5
xdebug.trace_output_dir = "D:\XAMPP\tmp"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

I set a Breakpoint in my code of Netbeans. I am getting Waiting For Connection (netbeans-xdebug) at the bottom of Netbeans while I click on Debug project button.

Could any one know where is the problem ??

1
try xdebug.remote_host=localhost if netbeans runs on the machine with IP 192.168.1.5 In Netbeans Set the url to http://localhost/myproject/index.php . also on localhost remove xdebug.remote_connect_back=1.moskito-x
My Comment could help you? any response to my comment?moskito-x
For me, I didn't know that there were THREE locations where I had to specify port = 9000, and the mismatch was causing “Waiting For Connection (netbeans-xdebug)”: stackoverflow.com/a/41768167/470749Ryan

1 Answers

1
votes

Since you already have it setup, I assume you checked all the usual suspects:

  • Config
  • Remote host
  • idkey

and so on.

Two things that I tend to forget are:

  1. Select Web Root folder for the project
  2. Make sure your code in Netbeans and on the server is the same. (Just download the project again)