You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugpy and by extension VSCode displays the values of variables using __repr__ when they are collapsed, but when expanded the internals of what should look like a list/dict/set are exposed:
The only way to fix this that I found is to write a pydevd extension. Unfortunately there's no standard paging mechanism (microsoft/debugpy#1179) so the variable resolvers do (list, tuple) and don't (dict, set) hand roll their own. I think copying the TupleResolver should be fine because everything is sorted and indexable.
The text was updated successfully, but these errors were encountered:
after spending an afternoon on this i think the extension mechanism is an after-afterthought, as seen by it being broken recently: microsoft/debugpy#1408 and microsoft/debugpy#1505, also the only viable place to put pydevd_plugins is in site-packages (odoo-ide/pydevd-odoo) - you can't play any tricks like patching sys.path when sortedcontainers is imported because pydevd only checks for plugins once before the program is started. i don't know if pip can handle aliased install directories but it's ugly either way.
and here i thought it'd just be like writing a bit of natvis (visual studio) or python (gdb) that gets embedded/referenced in the object file.
for now i've resorted to just casting the containers to their vanilla unsorted counterparts
Debugpy and by extension VSCode displays the values of variables using
__repr__
when they are collapsed, but when expanded the internals of what should look like a list/dict/set are exposed:The only way to fix this that I found is to write a pydevd extension. Unfortunately there's no standard paging mechanism (microsoft/debugpy#1179) so the variable resolvers do (list, tuple) and don't (dict, set) hand roll their own. I think copying the TupleResolver should be fine because everything is sorted and indexable.
The text was updated successfully, but these errors were encountered: