microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
273 stars 79 forks source link

Being able to prevent editing a type hint #255

Closed ncannasse closed 2 years ago

ncannasse commented 2 years ago

First, sorry if I'm posting into the wrong place for such question.

The Hashlink VM debugger displays some object type information in place of both the "value" and "type" of the variable, as the following screenshot shots :

image

This is nice to be able to know the exact instance type of your objects especially when dealing with subclasses. However atm, the value itself can be edited. Is there a way to mark it as "read only" to prevent the double click to enter edit mode ? Or alternatively, a way to not set any value and instead be able display the type ?

Best Regards, Nicolas

connor4312 commented 2 years ago

Yes, in the VariablePresentationHint you can assign readOnly as an attribute. Let us know if that doesn't work or you have further questions.

ncannasse commented 2 years ago

Thanks @connor4312 for the answer. However setting presentationHint : { attributes : ["readOnly"] } on the variables does not seem to have any effect. I'm currently using VSCode 1.55.2, was it implemented on more recent VSCode version?

connor4312 commented 2 years ago

Yea, this is something I fixed in I think 1.62.