Under Windows PHP installation and configuration xdebug

0 Preface

After the current manually upgrade from PHP 7.1.x to 7.2.y, VS Code of xdebug can not be used, () to view information with phpinfo, found xdebug plug-in is not active - () phpinfo page in less than xdebug see related information.

Have in fact xdebug official website to download the version of the corresponding dll file (shown below), and the relevant set association xdebug dll file in php.ini.

[PHP_XDEBUG]
zend_extension = "C:\Program Files\php-7.2.26-nts-Win32-VC15-x64\ext\php_xdebug-2.9.0-7.2-vc15-x86_64.dll"

 

Error after execution php.exe:

Failed loading C:\Program Files\php-7.2.26-nts-Win32-VC15-x64\ext\php_xdebug-2.9.0-7.2-vc15-x86_64.dll

1 Cause

 Loaded xdebug dll file does not match the version of PHP. PHP is nts version without careful dll file is downloaded ts version.

TS and NTS

TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).

 If you can not find the direct cause of this you can be phpinfo () page of text to copy and paste https://xdebug.org/wizard , and view the page analysis report, as shown below.

 

2 Solutions

Dll and follow the instructions to download the appropriate configuration, restart the server, you can in phpinfo () page to see xdebug activated.

Guess you like

Origin www.cnblogs.com/xunzhiyou/p/12094241.html