go-delve / delve

Delve is a debugger for the Go programming language.
MIT License
23.09k stars 2.15k forks source link

DAP Evaluate and SetVariables response not containing `type` with `supportsVariableType`. #3170

Open gfszr opened 2 years ago

gfszr commented 2 years ago

When issuing a SetVariable request or an Evaluate request, the response contains the type of the new value if supportsVariableType is negotiated upon DAP initialization. However, it is currently not returned:

https://github.com/go-delve/delve/blob/6440b3ba9216cb936f43318b96df540cf56b216f/service/dap/server.go#L2642-L2644

From a client's perspective the type is very important as SetVariables responses might return a different type than the original variable, let alone Evaluate which can return an arbitrary type.

Dlv Version: 1.9.1 Go Version: 1.16 Expected Result: EvaluateResponse/SetVariablesResponse contains the type of the variable. Actual Result: Type is not returned at all.

aarzilli commented 2 years ago

Closing since a fix was merged.

gfszr commented 2 years ago

@aarzilli was a fix merged for the missing type in SetVariableResponse as well?

aarzilli commented 2 years ago

No.