From a25d95bd236e5586026f47bbaef916cfa456a424 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 20 May 2021 16:39:28 -0400 Subject: [PATCH] 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. --- service/dap/server.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/service/dap/server.go b/service/dap/server.go index e678a480..13b4bf8e 100644 --- a/service/dap/server.go +++ b/service/dap/server.go @@ -1461,13 +1461,6 @@ func (s *Server) onVariablesRequest(request *dap.VariablesRequest) { s.sendErrorResponse(request.Request, UnableToLookupVariable, "Unable to lookup variable", err.Error()) 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: *newResponse(request.Request), Body: dap.VariablesResponseBody{Variables: children},