I'm having an issue with Visual Studio Code and Xdebug.
My System:
I'm using a Windows 10
system with IIS
webserver and PHP
version 7.4.
I've downloaded and installed Xdebug
with the last version (2.9.0) successfully (see the excerpt from the php.ini
below).
Visual Studio Code is configured for using Xdebug (see launch.json
file below).
My issue is:
When I set a breakpoint, it stops at this breakpoint. So far so good. But if I press then "Step into" (F11) or "Step over" (F10) buttons, nothing is happening at all. The initial breakpoint is still highlighted - it stays at the breakpoint.
Maybe something is configured wrong, but actually I can't figure out what it is.
See here the configuration files:
php.ini:
[XDEBUG]
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
xdebug.idekey=VSCODE
xdebug.remote_log ="C:\temp\xdebug.log"
[PHP_XDEBUG-2.9.0-7.4-VC15-NTS]
zend_extension = "C:\Program Files (x86)\PHP\v7.4\ext\php_xdebug-2.9.0-7.4-vc15-nts-x86_64.dll"
launch.json of Visual Studio Code:
{
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"ignore": [
"**/vendor/**/*.php"
]
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
xdebug.remote_log=/tmp/xdebug.org
, and thentail -f /tmp/xdebug.org
it to see what happens on the wire.