-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibly broken responses from evaluate
#751
Comments
I can confirm the issue and am working on a fix. |
The problem was in the traversing logic, see the PR. It assumed all chile nodes of the XML elements would be |
Hi @zobo Is it correct that there is no
|
The output is a bit strange. I am testing in VSC, but that should not matter: I used this code: $obj = new class extends stdClass {
public $z = 1;
};
xdebug_break();
echo ''; And here is the relevant log:
And when I expand the variable tree
Notice there is no DBGP request, as the structure of all nested elements of I know you provided a good test case, I just cant setup things right now. If you can, please retry the test and also try to include the various logs sent by the debug adapter (OutputEvent). Don't forget to add |
I'll try to make some more expressive example in free time. |
I still did not found where I can find log entries from the adapter after setting
With this feature I get proper XML XDebug response without NULL characters <?xml version="1.0"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="18">
<property type="object" children="1" numchildren="1" page="0" pagesize="512">
<classname encoding="base64"><![CDATA[c3RkQ2xhc3NAYW5vbnltb3VzAC9ob21lL2FyY3RneC9kZXYvYXJjdGd4L3ZpbS10ZXN0LWVudnMvZGFwLXVpLXRlc3QvdGVzdC8wNy1hbm9ueW1vdXMtY2xhc3Mtdy1hZGFwdGVyLTEuMjQvaW5kLnBocDozJDA=]]></classname>
<property name="z" facet="public" type="int"><![CDATA[1]]></property>
</property>
</response> but I still get no {
arguments = {
context = "repl",
expression = "$obj",
frameId = 1
},
command = "evaluate",
seq = 14,
type = "request"
} {
body = {
result = "stdClass@anonymous\0/home/test/nvim-test/dap-ui-test/test/07-anonymous-class-w-adapter-1.24/ind.php:3
$0",
variablesReference = 20
},
command = "evaluate",
request_seq = 14,
seq = 85,
success = true,
type = "response"
} ... {
arguments = {
variablesReference = 20
},
command = "variables",
seq = 15,
type = "request"
} {
body = {
variables = {
{
presentationHint = vim.empty_dict(),
type = "",
value = "stdClass@anonymous\0/home/test/nvim-test/dap-ui-test/test/07-anonymous-class-w-adapter-1.24/ind.ph
p:3$0",
variablesReference = 0
},
{
evaluateName = "z",
name = "z",
presentationHint = {
visibility = "public"
},
type = "int",
value = "1",
variablesReference = 0
}
}
},
command = "variables",
request_seq = 15,
seq = 88,
success = true,
type = "response"
} |
On Vimspector log message looks as expected and no problem with evaluation:
It would be good to catch original messages instead of logs converted by the client. |
Now I figured it out. The problem comes after expanding the eval result. And indeed there it can be reproduced... Pushing out a fix. |
Now I get the correct response without complain from the clients:
I am glad that we managed to close it. Thanks again! |
PHP version: 8.1.2
Xdebug version: 3.1.2
VS Code extension version: 1.24.0
Given a PHP code
try to evaluate
$obj
after stopping at the breakpoint. Thecontext
does not matter: I tested both oneval and
repl`.From XDebug I get
nvim-dap logs the following response from the adapter:
Please note that some
variables
does not havename
field.If you want to see the working example, in https://github.com/przepompownia/dap-ui-test please run
make start
to install dependencies andmake anonymous-class
to reproduce the example.There seems to be also a problem with evaluation by
dbgpClient
CLI. I reported it on https://bugs.xdebug.org/view.php?id=2066The text was updated successfully, but these errors were encountered: