Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
441 views
in Technique[技术] by (71.8m points)

php - NetBeans can't connect Xdebug after updates

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?

question from:https://stackoverflow.com/questions/65871591/netbeans-cant-connect-xdebug-after-updates

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...