I am using windows 8, Netbeans 8.2, php 5.6, Apache and mysql. I installed them manually and did not use all-in-one package like WAMP.
When I click on debugging icon (Ctrl+F5) it gets stuck on "waiting for connection (netbeans-xdebug)" while shows the page completely without stopping at the break points.
I reviewed all the possible solutions but none of them worked for me. Such as:
- Changing the remote_host from "localhost" to 127.0.0.1 or even to the ip address of my machine
- Changing the port from 9000 to different ports. Also checking the "Session-ID = netbeans-xdebug"
- Setting the default "web browser" on Netbeans
- Checking https://xdebug.org/wizard.php and following the instruction
- Setting the date.zone in php.ini
- Checking the firewall (as far as I could find my firewall does not block the connection)
- Restarting httpd.exe (Apache) and netbeans and browser
Here are some info which gained from my system:
From https://xdebug.org/wizard.php:
Tailored Installation Instructions
Summary
Xdebug installed: 2.5.0rc1
Server API: Apache 2.0 Handler
Windows: yes - Compiler: MS VC11 - Architecture: x64
Zend Server: no
PHP Version: 5.6.27
Zend API nr: 220131226
PHP API nr: 20131226
?Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:Windows
Configuration File: C:phpphp.ini
Extensions directory: ext
You're already running the latest Xdebug version
From php -m command:
[PHP modules]
bcmath
calendar
.
.
. (I deleted them intentionally)
[Zend modules]
Xdebug
From netstat | findstr 9000
TCP ??127.0.0.1:9000 ????? mycomputername:62936 ?? CLOSE_WAIT
TCP ?? 127.0.0.1:62936 ?? mycomputername:9000 ?? FIN_WAIT_2
TCP ?? [::1]:9000 ?? mycomputername:62935 ?? CLOSE_WAIT
TCP ?? [::1}:62935 ?? mycomputername::9000 ?? FIN_WAIT_2
Last but not least in php.ini there was no [Xdebug] section!! there was some lines but as a separated section like some people said there was nothing so at the end of file I added these lines:
[xdebug]
zend_extension = php_xdebug-2.5.0rc1-5.6-vc11-x86_64.dll
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_enable = on
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
I appreciate any suggestion.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…