After posting how I compiled Xdebug PHP extension on Windows I got an interesting comment how I can improve the process.
The comment came again from Christoph on Twitter:
Great!— Christoph M. Becker (@cmbecker69) August 17, 2021
If you'd need bison etc., you can fetch https://t.co/058sby3fSg, and use phpsdk-vs16-x64.bat instead of the x64 Native Tools Command Prompt for VS 2019.
I wasn’t aware of this precomputed SDK from Microsoft. Here is the link: https://github.com/microsoft/php-sdk-binary-tools
My final setup is as follows: In one folder clone or download
- Development package from https://windows.php.net/qa/
- The extension: https://github.com/xdebug/xdebug.git
php-8.1.0beta2-devel-vs16-x64 php-sdk-binary-tools xdebug
Go to your the php-sdk-binary-tools and run the appropriate init script. In my case:
c:\php\php-sdk-binary-tools>phpsdk-vs16-x64.bat [vcvarsall.bat] Environment initialized for: 'x64' PHP SDK 2.2.1-dev OS architecture: 64-bit Build architecture: 64-bit Visual C++: 14.29.30133.0 PHP-SDK path: c:\php\php-sdk-binary-tools
Go to your extension folder and relatively run phpize.
c:\php>cd xdebug c:\php\xdebug>..\php-8.1.0beta2-devel-vs16-x64\phpize.bat Rebuilding configure.js c:\php\php-8.1.0beta2-devel-vs16-x64 module ... Now run 'configure --help'
configure.bat --with-xdebug and