Is it possible to inspect objects from a list
tkdchen opened this issue · 3 comments
Hi, show_growth
can show created lists since last call. Is it possible for objgraph to show the specific objects inside a list?
I'm not sure I understand the question?
Sorry, let me try to reword. When I see for example there is one list added shown in result of show_growth
, I would like to see what objects are included in that list. I'm not sure which objgraph API could be used.
Ah! You'd have to use get_new_ids()
instead of show_growth()
to get the information about specific objects. The example at https://mg.pov.lt/objgraph/objgraph.html#objgraph.get_new_ids shows you how to get all the newly created list objects since previous call, and then you can inspect them using traditional tools like print() or pprint.pprint().