我试图使用XDebug与PHP代码在Windows上。我成功地安装了XDebug,因为它显示在phpinfo()页面中。
当我试图在VS代码上使用XDebug时,我会得到以下错误:
DEBUG Checking PHPLS_ALLOW_XDEBUG
DEBUG The xdebug extension is loaded (2.7.1)
DEBUG Process restarting (PHPLS_ALLOW_XDEBUG=internal|2.7.1|0|*|*)
DEBUG Running C:\Users\***\Documents\Applications\php-7.3.4-nts-Win32-VC15-x64\php.exe -n -c C:\Users\***\AppData\Local\Temp\AF9E.tmp c:\Users\***\.vscode\extensions\felixfbecker.php-intellisense-2.3.10\vendor\felixfbecker\language-server\bin\php-language-server.php --tcp=127.0.0.1:50124 --memory-limit=4095M
DEBUG Checking PHPLS_ALLOW_XDEBUG
DEBUG Restarted (64 ms). The xdebug extension is not loaded
[Info - 11:04:12 AM] 1 files total
[Info - 11:04:12 AM] Indexing project for definitions and static references
Parsing file:///c:/xampp/htdocs/blank/blank.php
[Info - 11:04:12 AM] Indexing project for dynamic references
[Info - 11:04:12 AM] 0 Packages
[Info - 11:04:12 AM] All 1 PHP files parsed in 0 seconds. 148 MiB allocated.发布于 2019-09-03 06:36:25
我也遇到了这个问题,看看所提供的配置(在上面的最初示例中是C:\Users\***\AppData\Local\Temp\AF9E.tmp),我发现zend_extension行已经被注释掉了。
即。它在.tmp文件中如下所示:
;zend_extension=php_xdebug-2.7.2-7.3-vc15-nts-x86_64.dll
分号是评论人物。
一个小实验表明,它是根据文件名对其进行注释。我将DLL重命名为totallynotphpdebgr272.dll,并将其设置为php.ini中的zend_extension。更改之后,它不再注释生成的.tmp文件中的该行,我能够在vscode中成功地调试php。
https://stackoverflow.com/questions/55928265
复制相似问题