I've installed PHP v8.2.12 as a part of an XAMPP installation on my Windows 11.
Used the Xdebug wizard to figure out which binary I needed using the output of phpinfo();
which returned:
Summary
Xdebug installed: no
Server API: Apache 2.0 Handler
Windows: yes
Compiler: MS VS16
Architecture: x64
Zend Server: no
PHP Version: 8.2.12
Zend API nr: 420220829
PHP API nr: 20220829
Debug Build: no
Thread Safe Build: yes
OPcache Loaded: no
Configuration File Path: no value
Configuration File: C:\xampp\php\php.ini
Extensions directory: C:\xampp\php\ext
Instructions
Download php_xdebug-3.3.1-8.2-vs16-x86_64.dll
Move the downloaded file to C:\xampp\php\ext, and rename it to php_xdebug.dll
Update C:\xampp\php\php.ini and add the line:
zend_extension = xdebug
Restart the Apache Webserver
Did all these things and have attempted to see if it installed correctly using php --version
which returns:
PHP Warning: Can't load module 'C:\xampp\php\ext\php_xdebug.dll' as it's linked with 2.25, but the core is linked with 14.29 in Unknown on line 0
After some fair amount of Googling, I think I've figured out that my compilations of PHP and Xdebug are not compatible (see here). The problem is I have no idea how to compile Xdebug from source on Windows (see GitHub docs), nor am I 100% certain this is actually the issue. Any ideas?
Had to redownload the dll from the downloads page instead of via the link given to me on the wizard.