Search code examples
pythondebuggingpudb

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?


Solution

  • 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.