'Debugging PHP, NetBeans not working with xdebug v3

Debugging PHP, NetBeans not working with xdebug v3

I'm using ubuntu 18

PHP7.4

Xdebug v3.1.2

php-v 
PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
    with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans

My xdebug configuation is

/etc/php/7.4/mods-available/xdebug.ini

zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.profiler_enable=1

Every time I click run in the Netebeans, I get on this message "Waiting for connection"



Solution 1:[1]

The default Port for xdebug V3 is 9003 and all the above the configurations are removed in xdebug v3

Replace

xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.profiler_enable=1

With

xdebug.log="/var/log/xdebug.log"
xdebug.idekey=netbeans-xdebug
xdebug.mode=debug
outbut_buffering=Off

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ahmad Halah