Cannot expand attributes of int subclass in Variables, Watch or Debug Console #1758
Unanswered
laundmo
asked this question in
Enhancements
Replies: 1 comment 1 reply
-
Thanks for the suggestion. I believe this would need some sort of setting Internally debugpy just does a Transferring to a discussion item for upvotes. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Subclasses of int (and other "primitives") cannot be expanded and their attributes cannot be inspected.
Reproduction
Debug this python file:
As you can see, there's no toggle to expand/collapse the attributes list


Solutions
I've orderd solutions i can think of in order of preference
isinstance(x, int)
or a equivalent to check whether a variable is a primitive type, usetype(x) is int
so only subclasses show up as normal instances.Beta Was this translation helpful? Give feedback.
All reactions