'how to debug Apache netbeans php project

I am unable to get xdbug working on Apache Netbeans 12.6 running on Windows 10 with jdk 17.0.2. I have downloaded php_xdebug-3.1.2-8.1-vs16-x86_64.dll into my wamp64\bin\php\ext directory and renamed it php_xdebug.dll.

I updated my wamp64\bin\apache\apache2.4.51\bin\php.ini to include the following: ` [opcache]

zend_extension = xdebug

and added the following to the end of the php.ini file:

[xdebug]

zend_extension="c:/wamp64/bin/php/php7.4.26  /ext/php_xdebug.dll 
[xdebug 2]
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost(or hostname)
xdebug.remote_port=9003(default port 9000)
xdebug.idekey="NB-IDE"

[xdebug 3]

xdebug.mode=debug
xdebug.client_host=localhost(or hostname)
xdebug.client_port=9003(default port 9003)
xdebug.idekey="NB-IDE" 

`



Sources

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

Source: Stack Overflow

Solution Source