2024-03-28 13:12:15 发布
网友
我正在学习如何使用ipdb调试器。我插入了一个断点,通过输入continue,我从一个断点前进到另一个断点。如果我想在两个断点之间执行一半的时候打印变量a的值,那么如何使用ipdb/pdb来实现呢?我试着打印和打印,但什么也没有出现。
您可以在IPDB控制台中使用p或pp。在
来自pdb documentation:
p expressionEvaluate the expression in the current context and print its value.pp expressionLike the p command, except the value of the expression is pretty-printed using the pprint module
p expression
Evaluate the expression in the current context and print its value.
pp expression
Like the p command, except the value of the expression is pretty-printed using the pprint module
您可以在IPDB控制台中使用p或pp。在
来自pdb documentation:
相关问题 更多 >
编程相关推荐