facebook / facebook/hhvm

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

Open
#8,668 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.