Xdebug in netbeans does not bind to port 9000

I am trying to configure xdebug to work with netbeans, my current configuration

[xdebug]
zend_extension="C:\binaries\php\ext\php_xdebug-2.1.0RC1-5.3-vc6.dll"
xdebug.remote_enable=on 
xdebug.remote_handler=dbgp 
xdebug.remote_host=127.0.0.1 (also tried localhost)
xdebug.remote_port=9000 
xdebug.idekey="netbeans-xdebug"

I tried the test provided by the netbeans block explaining how to check if the configuration works when binding to it, simply prints "impossible to bind"

Any suggestions?

+3
source share
3 answers

A few things from my head ...

First, make sure port 9000 is not listening anymore (at the command prompt, type netstat -an).

If this does not show anything, make sure that Windows Firewall is not turned on.

+2
source

That was my solution to the same problem.

The xdebug configuration in php.ini is minimized.

php.ini:

[XDebug]
zend_extension = C:\Bitnami\wampstack-5.6.21-2\php\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_autostart=0
xdebug.remote_connect_back=0

Project > Run configuration:

Project URL: http://127.0.0.1:9000/<ProjectName>/
Index File: index.php

> > PHP >

Debugger Port: 9001
Session ID: netbeans-xdebug
Maximum Data Length: 2048
uncheck all Checkboxes

, . , netbeans, , php.ini(xdebug-port) httpd (apache-port)

Server: 127.0.0.1:9000
XDebug: 127.0.0.1:9001

netbeans , Netbeans CTRL + F5 (Run Debug).

+1

This worked for Ubuntu 16.04, Net beans 8.2

open xdebug.ini (for me it was in / etc / php / {php-version} / mods-available) and put

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000

Net beans -> Tools> Options> PHP> Debugging

Debugger Port: 9000
Session ID: netbeans-xdebug
Maximum Data Length: 2048

all checkboxes are not checked.

My configs were fine, as mentioned above, but it didn’t work fine until I unchecked all the boxes as indicated by @Beka.

0
source

Source: https://habr.com/ru/post/1749821/


All Articles