Open stgpepper opened 3 weeks ago
I'll do a quick test to see if this "issue" is part of Xdebug or the plugin.
Hi. Sorry for the late reply. This does not present here. PHP 8.2.8 Xdebug: 3.4.0-alpha
-> evaluateRequest
{ command: 'evaluate',
arguments: { expression: "$myarr['myval']", frameId: 1, context: 'watch' },
type: 'request',
seq: 11 }
xd(1) <- eval -i 12 -- JG15YXJyWydteXZhbCdd
xd(1) -> <?xml version="1.0" encoding="iso-8859-1"?><response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="12"><property type="string" size="4" encoding="base64"><![CDATA[dGVzdA==]]></property></response>
<- evaluateResponse
Response {
seq: 0,
type: 'response',
request_seq: 11,
command: 'evaluate',
success: true,
body: { result: '"test"', variablesReference: 0 } }
and
-> evaluateRequest
{ command: 'evaluate',
arguments: { expression: '$myarr->myval', frameId: 1, context: 'watch' },
type: 'request',
seq: 12 }
xd(1) <- eval -i 13 -- JG15YXJyLT5teXZhbA==
xd(1) -> <?xml version="1.0" encoding="iso-8859-1"?><response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="13"><property type="null"></property></response>
<- evaluateResponse
Response {
seq: 0,
type: 'response',
request_seq: 12,
command: 'evaluate',
success: true,
body: { result: 'null', variablesReference: 0 } }
Please repeat your test and set log
to true
and attack the whole output in Debug Console.
PHP version: 8.2 Xdebug version: 3.3.1 VS Code extension version: v1.35.0
Your launch.json:
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:
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.