I followed the instructions on xdebug.org to install xdebug on my m2 mac.
For compiling the extension I installed php on my machine, so I installed the latest 8.2
I also installed xdebug with pecl with -arm64 (for my M2 as told by file which php
) and and it loads when I try php -v
But on xampp I seem to have another php installation, which is 8.1, as it says in the phpinfo() on localhost.
The extension I created (obviously using the system 8.2 for compilation) with the 8.1 localhost-phpinfo on xdebug.org/wizard is in place.
When I check /Applications/XAMPP/xamppfiles/bin/php, it shows the reason why the extension is not loaded:
Failed loading /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so: dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so, 0x0009): tried: '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
There it says need "x86_64" although my mac is M2 and so arm64. Is it possible that I have a x86_64 php in xampp and arm64 php in my system php? How can I get a suitable xdebug-3.2.2.tgz? Or should I reinstall xampp with hopefully a arm64 php 8.2?
I am lost.