I built according to https://xdebug.org/docs/install from source, since pecl/pearl is broken:
pecl install xdebug
downloading xdebug-2.8.0.tgz ...
Starting to download xdebug-2.8.0.tgz (238,122 bytes)
.................................................done: 238,122 bytes
PHP Fatal error: Cannot use result of built-in function in write context in /usr/share/php/Archive/Tar.php on line 639
After building, lib is in /usr/lib/php/20180731/xdebug.so
.
I added in /etc/php/7.3/apache2/php.ini
:
[opcache]
...
[xdebug]
zend_extension=~"/usr/lib/php/20180731/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
I restarted apache: service apache2 restart
I checked with service apache2 status
.
When I run php -m
, it shows
[Zend Modules]
Zend OPcache
but no XDebug.
Output of php --version
is:
PHP 7.3.12-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 28 2019 07:36:56) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.12-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
root@HAL:/home/richard#
No XDebug also. So now I can't get XDebug to work with Visual Studio Code. Any ideas? Many thanks