1 year ago

#77162

test-img

Yoni Lavi

VS code's Python debugger and its ability to show contained items in iterables or mappings

I noticed that the debugger's ability to show what items are held in a mapping or iterable only works for some types but not others. Is there a way to "explain" to the debugger that you want the individual items to show for a certain mapping / iterable?

Here's a couple of examples:

enter image description here

The mappingproxy is missing the nested items ('a': 1 and 'b': 2 here). This makes it infeasible to browse its values when populated by a few 10s or 100s of items.

Here's another example: enter image description here

You can see that the debugger knows how to traverse the values using the iterator, why doesn't it print them as nested items when expanded?

python

visual-studio-code

0 Answers

Your Answer

Accepted video resources