Ive read most all of the posts about setting up pgp xdebug for VS code but no solution for me. Ive installed VS code on a new laptop (thats relevant because I know what else is installed and theres no multiple instance of php – but there seems to be!!)
Ive installed XAMP which includes php 8.2.12 on a win11 pc.
the php -v shows
Copyright (c) The PHP Group
Zend Engine v4.2.12, Copyright (c) Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans`
the PHP.ini says `zend_extension = c:xamppphpextphp_xdebug.dll
xdebug.start_with_request = yes
xdebug.client_port = 9900
xdebug.client_host = 127.0.0.1
xdebug.default_enable=1
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_log="C:xamppapachelogsxdebug.log"
the json settings in VScode are
"workbench.colorTheme": "Visual Studio Light",
"debug.allowBreakpointsEverywhere": true,
"php.executables": { "v8.2": "//xampp//php//php.exe" },
"launch": {
"configurations": [ {
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9900,
"pathMappings": {
"c:/xampp/php/ext": "${workspaceFolder}"
}
}
]]
}
}`
According to all the posts Ive read that should do it but on trying to debug a simple php I get this error
`Failed loading C:phpextphp_xdebug-2.6.1-7.2-vc15-nts-x86_64.dll`
Now Im no expert but this seems to be saying its trying to run php 7.2 and wants the xdebug 2.6.1. non thread safe xdebug.dll
BUT I can find NO other instance of php.exe on the PC - where in VS code is it looking for c:phpext a folder which doesnt exist - I cant find in VS code where such settings exist or how to tell VS code to look in right folder (in this case c:xamppphpext)
FWIW Im using RobertLu's php debug extension though Ive tried all others available. On previous laptop some time ago I did have some success using Felix Beckers php debug externsion but that is no longer appearing in VSCode list of available extensions
Any comments or suggestions gratefully received