MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / resolve_compound_variable_fields

Function resolve_compound_variable_fields

_pydevd_bundle/pydevd_vars.py:128–146  ·  view source on GitHub ↗

Resolve compound variable in debugger scopes by its name and attributes :param thread_id: id of the variable's thread :param frame_id: id of the variable's frame :param scope: can be BY_ID, EXPRESSION, GLOBAL, LOCAL, FRAME :param attrs: after reaching the proper scope, we have

(dbg, thread_id, frame_id, scope, attrs)

Source from the content-addressed store, hash-verified

126
127
128def resolve_compound_variable_fields(dbg, thread_id, frame_id, scope, attrs):
129 """
130 Resolve compound variable in debugger scopes by its name and attributes
131
132 :param thread_id: id of the variable's thread
133 :param frame_id: id of the variable's frame
134 :param scope: can be BY_ID, EXPRESSION, GLOBAL, LOCAL, FRAME
135 :param attrs: after reaching the proper scope, we have to get the attributes until we find
136 the proper location (i.e.: obj\tattr1\tattr2)
137 :return: a dictionary of variables's fields
138 """
139
140 var = getVariable(dbg, thread_id, frame_id, scope, attrs)
141
142 try:
143 _type, type_name, resolver = get_type(var)
144 return type_name, resolver.get_dictionary(var)
145 except:
146 pydev_log.exception("Error evaluating: thread_id: %s\nframe_id: %s\nscope: %s\nattrs: %s.", thread_id, frame_id, scope, attrs)
147
148
149def resolve_var_object(var, attrs):

Callers

nothing calls this directly

Calls 3

getVariableFunction · 0.85
exceptionMethod · 0.80
get_dictionaryMethod · 0.45

Tested by

no test coverage detected