开发者

xdebug in netbeans won't bind to port 9000

开发者 https://www.devze.com 2023-01-03 20:00 出处:网络
I\'ve been trying to configure xdebug to work along with netbeans, my current configuration is [xdebug]

I've been trying to configure xdebug to work along with netbeans, my current configuration is

[xdebug]
zend_extension="C:\bina开发者_StackOverflow中文版ries\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 a netbeans blog explaining how to test if the configuration works when binding it just outputs "unable to bind"

Any suggestions?


A couple of things off the top of my head...

Firstly, check that nothing else is already listening to port 9000 (on the command line, type netstat -an ).

If that doesn't show anything, make sure the Windows Firewall is not enabled.


This was my Solution for the same issue.

The Configuration of xdebug in the php.ini is minimalized.

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

Right click Project > Run configuration:

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

Tools > Options > PHP > Debugging

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

The Debugger Port has to be another than the Server Port. The Ports defined in netbeans have to match the one defined in php.ini(xdebug-port) and httpd(apache-port)

Server: 127.0.0.1:9000
XDebug: 127.0.0.1:9001

Close netbeans and restart the server, open Netbeans and press CTRL+F5 (Run Debug).


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

unchecked all Check-boxes here.

My configs were just fine as mentioned above but it wasn't working fine until i unchecked all check-boxes as mentioned by @Beka.

0

精彩评论

暂无评论...
验证码 换一张
取 消