mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 03:42:59 +08:00
service/dap: remove unnecessary capability check
The Types field is only set in childrenToDAPVariables if the client capability is supported. There is no need to check again after the children have been calculated.
This commit is contained in:
committed by
Alessandro Arzilli
parent
c8934dc33b
commit
a25d95bd23
@ -1461,13 +1461,6 @@ func (s *Server) onVariablesRequest(request *dap.VariablesRequest) {
|
|||||||
s.sendErrorResponse(request.Request, UnableToLookupVariable, "Unable to lookup variable", err.Error())
|
s.sendErrorResponse(request.Request, UnableToLookupVariable, "Unable to lookup variable", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !s.clientCapabilities.supportsVariableType {
|
|
||||||
// If the client does not support variable type
|
|
||||||
// we cannot set the Type field in the response.
|
|
||||||
for i := range children {
|
|
||||||
children[i].Type = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
response := &dap.VariablesResponse{
|
response := &dap.VariablesResponse{
|
||||||
Response: *newResponse(request.Request),
|
Response: *newResponse(request.Request),
|
||||||
Body: dap.VariablesResponseBody{Variables: children},
|
Body: dap.VariablesResponseBody{Variables: children},
|
||||||
|
|||||||
Reference in New Issue
Block a user