2

I made a mistake and allowed Ubuntu 18.04 updates to be installed. NetBeans 12.1 cannot connect to Xdebug after doing this with the same configuration. I think the problem is with the newer version of Xdebug (3.0.2).

# cat /etc/php/7.2/apache2/conf.d/20-xdebug.ini

zend_extension=xdebug.so

xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9003

NetBeans settings

Anyone faced such problem?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
rokot
  • 58
  • 5
  • 1
    1) *"NetBeans 12.1 cannot connect to Xdebug"* NO. It's Xdebug that connects to IDE and NOT other way around. 2) Yes, it's Xdebug v3 -- v3 used DIFFERENT config params that v2. Your current Xdebug config does **nothing** in v3. Just check https://xdebug.org/docs/upgrade_guide and update your config accordingly (it's just matter of renaming config params, adding one new, remove existing). – LazyOne Jan 24 '21 at 22:58
  • Thank you for the answer! It was really helpful! Working config: `xdebug.mode=debug,develop` – rokot Jan 26 '21 at 15:37

1 Answers1

0

I have spent a whole day and a half trying to get the NetBeans ISE 12.0 debugger working - it was always hanging on “Waiting For Connection (netbeans-xdebug)”.

I have now solved this - as you say, Xdebug version 3 is very different to version 2 and most of the documentation on the web has not caught up. This is the page that you need: Upgrade Guide

This is the configuration that works for me (I kept my IDE setting to use port 9000):

zend_extension=/usr/lib/php/20180731/xdebug.so
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.client_host=127.0.0.1
xdebug.client_port=9000
engeeaitch
  • 81
  • 3
  • 11