Reputation: 883
I have Ubuntu 18.04, XAMPP, PHP 7.3.0 and I tried installing XDEBUG using the XDEBUG wizard after pasting the output of my phpinfo() and added the location of xdebug.so in the php.ini file. But still php -m
doesn't show XDEBUG. Can someone please help to figure this out? Let me know if anyone successfully implemented this with PHP 7.3 XAMPP and XDEBUG.
Upvotes: 3
Views: 1520
Reputation: 12365
php -m
is a terminal command. Be aware that sometimes CLI PHP will use a different ini file than that of your web server PHP.
So you can check which ini files were loaded with this command:
php -i | grep ini
Check you have XDebug installed by checking phpinfo()
in your browser. If it is using a different ini, and you want xdebug available in the CLI, copy the ini settings from this one to the one the terminal told you.
Once you know, check the port in your IDE matches the settings the wizard gave you for your ini. PHPStorm for instance defaults to 9000, but if you use PHP-FPM then it uses 9000, meaning I had to make my debug port 9001 and change it in the IDE too.
Make sure the IDE is listening for incoming connections (PHPStorm has a little telephone type icon which will be either green or red)
Make sure you have set a breakpoint in your code. It's a good idea to try it on the first line. Just click to the left of the line of code next to the line number, and you should get a red spot indicating your breakpoint.
Finally, ensure you are sending the XDebug header with your request! I use a browser extension that allows me to enable/disable at the click of a button. Here's one for Chrome! https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en
Upvotes: 1
Reputation: 3653
XDebug does fully support debugging for PHP 7.3 and XAMPP. I tested it just now again with the latest version of XDebug (2.7.1), PHP 7.3.0 and XAMPP.
At first, it didn't work for me either (except in my first line of code, but it didn't stop in other lines). It was similar to the problem discussed here which was caused by an old version of IDE. Updating my PhpStorm IDE fixed the problem (This problem and fix was only for PhpStorm IDE).
Therefore, if you are using PhpStorm, follow these steps:
PS. You should add more details to your question, such as IDE, IDE version, what you have done already, and your debugging settings.
Upvotes: 1