0

I've installed Xdebug and setup by this instruction:

Install Xdebug PHP:

sudo apt-get update -y
sudo apt-get install -y php7.4-xdebug

Find xdebug.so, then add the first one to php.ini:

sudo updatedb
locate xdebug.so

enter image description here

locate php.ini

enter image description here

Config php.ini:

sudo gedit /etc/php/7.4/apache2/php.ini

enter image description here

Then restart Apache web server:

sudo service apache2 restart

PhpStorm settings and code:

enter image description here enter image description here

Result and Xdebug Chrome extension enabled:

enter image description here

Did I miss anything? This setting works fine for me in PHP 7.2 and bellow but now on PHP 7.4 and it's not working any more.

1 Answer 1

1

For PHP 7.4 you need xdebug.so with 20190902 in the path.

You can check that from phpinfo() output: and you will see the PHP API version there, at the very top:

PHP 7.4:

...
PHP API => 20190902
PHP Extension => 20190902
Zend Extension => 320190902
...

PHP 7.2:

...
PHP API => 20170718
PHP Extension => 20170718
Zend Extension => 320170718
...

Your 20131226 is for PHP 5.6.

You have to use extensions that were compiled to use the same API version.

So double check phpinfo() output: you need to confirm that right API version is used + that Xdebug is actually loaded and enabled (use xdebug_info() for Xdebug v3; for Xdebug v2 you will have to check dedicated Xdebug section from phpinfo() output).

Sign up to request clarification or add additional context in comments.

3 Comments

FWIW, You can probably do without specifying the path, and just do zend_extension=xdebug.so. I think that works since PHP 5.3.
@LazyOne You answer are correct, i didn't know that we need to search for PHP API in phpinfo() and get that version for xdebug.so. I thought it must be the first one i found in locate xdebug.so. Thanks you.
@Derick you are right too, i've try the zend_extension="xdebug.so" and it's work as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.