在python调试器中检查复杂变量,例如pudb [英] inspect complex variable in python debugger, like pudb

查看:127
本文介绍了在python调试器中检查复杂变量,例如pudb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何使用python调试器检查复杂变量(列表,字典,对象)的值,我是python的新手,我尝试过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.

是否可以使用pudb检查值?还是有其他任何python调试器可以做到这一点?

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

推荐答案

要查看pudb中复杂数据类型的内容,请执行以下操作:

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

  1. 使用向右箭头将光标移至右侧的 Variables 框.

使用向上和向下箭头将光标移动到您感兴趣的变量.

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

使用反斜杠"\"显示/隐藏数据结构的内容.

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

这篇关于在python调试器中检查复杂变量,例如pudb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆