Open
Description
PHP version: 8.2
Xdebug version: 3.3.1
VS Code extension version: v1.35.0
Your launch.json:
"version": "0.2.0",
"configurations": [
{
"name": "Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html/": "${workspaceFolder}/src/"
},
"log": false
},
]
}
Xdebug php.ini config: -
Xdebug logfile (from setting xdebug.log
in php.ini): -
VS Code extension logfile (from setting "log": true
in launch.json): -
Code snippet to reproduce:
$myarr['myval'] = "test";
echo $myarr['myval']."\n";
echo $myarr->myval;
I added two watch expressions:
$myarr['myval']
$myarr->myval
Both watches incorrectly show the value "test"
, even though only the array access $myarr['myval']
is valid and the object access $myarr->myval
should be null or result in an error.