Install xdebug with PHP 8.2 on Ubuntu 22.04

<OLD>Ref: https://gist.github.com/henryonsoftware/066d8282daaf8c2ae281ce010e3e5404

1. Download xdebug source code from https://github.com/xdebug/xdebug/releases
for example the xdebug 3.3.2 from https://github.com/xdebug/xdebug/archive/refs/tags/3.3.2.tar.gz

2. extract the downloaded file
satria@teddy:~$ cd Downloads/
satria@teddy:~/Downloads$ tar -xvzf xdebug-3.3.2.tar.gz

3. run ‘phpize’
satria@teddy:~/Downloads$ cd xdebug-3.3.2/
satria@teddy:~/Downloads/xdebug-3.3.2$ phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902
configure.ac:165: warning: The macro `AC_PROG_LIBTOOL’ is obsolete.
configure.ac:165: You should run autoupdate.
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from…
configure.ac:165: the top level

4. run ‘./configure’
satria@teddy:~/Downloads/xdebug-3.3.2$ ./configure

5. run ‘make’
satria@teddy:~/Downloads/xdebug-3.3.2$ make

6. copy the module xdebug.so to php lib 20210902
</OLD>
<NEW>

Use php from repository ppa:ondrej/php
then install php8.2-dev
[codesyntax lang=”php”]

[/codesyntax]

then install php8.2-xdebug
[codesyntax lang=”php”]

[/codesyntax]

check the php version
[codesyntax lang=”php”]

[/codesyntax]

if not php8.2, you can select it by using
[codesyntax lang=”php”]

[/codesyntax]

CONFIG XDEBUG

SETTING

 

Leave a Reply

Your email address will not be published. Required fields are marked *