def get_locals(self, cur_frame, frame_kind):
if frame_kind == FRAME_KIND_DJANGO:
locs = {}
# iterate going forward, so later items replace earlier items
for d in cur_frame.f_locals['context'].dicts:
# hasattr check to defend against someone passing a bad dictionary value
# and us breaking the app.
if hasattr(d, 'keys') and d != DJANGO_BUILTINS:
for key in d.keys():
locs[key] = d[key]
else:
locs = cur_frame.f_locals
return locs
visualstudio_py_debugger.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录