facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.13k stars 2.99k forks source link

[vsdebug] "Invalid variable attributes" error when trying to inspect variables during debugging #8668

Open PranayAgarwal opened 4 years ago

PranayAgarwal commented 4 years ago

Describe the bug VS Code debugger shows "Invalid variable attributes" in the variables panel when stopped at a breakpoint.

image

This is happening because the Debug Adapter Protocol requires a variablesReference field in the Variable type sent by the debug server (https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable), which HHVM currently doesn't return. It is likely that VS Code started enforcing this field in a recent version, which led to this behavior.

I have fixed it on the VS Code extension side by adding an override to the "variables" response (https://github.com/slackhq/vscode-hack/pull/92), but it should ideally be fixed on the debug server side.

fredemmott commented 4 years ago

Probably fixed by 1b6af33fd065fc56ef931f56495a713a80fa338c , in 4.45+; definitely backport-friendly