Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

inspect complex variable in python debugger, like pudb

How could I inspect complex variable (list, dict, object) value with python debugger, I am new to python, I tried pudb, it looks like when the variable type is complex type, the debugger only show type of the variable, not the value.

Is it possible to inspect value with pudb? or is there any other python debugger can do this?

like image 569
fuyi Avatar asked Sep 14 '12 14:09

fuyi


1 Answers

To see the contents of a complex data type in pudb:

  1. Use the right arrow to move the cursor to the Variables box on the right.

  2. Use the up and down arrows to move the cursor to the variable you're interested in.

  3. Use the backslash '\' to show/hide the contents of the data structure.

like image 61
necromuralist Avatar answered Nov 03 '22 00:11

necromuralist