'How to print p variable inside ipdb
I have variable called p
and I want to print its value inside ipdb
.
p = 100
breakpoint() # DEBUG
ipdb> help p
p expression
Print the value of the expression.
ipdb> p
*** SyntaxError: unexpected EOF while parsing
I can't to it since p has an alias inside ipdb
. How can I force p
to print its value?
Solution 1:[1]
You can use p p
command and print
function:
ipdb> p p
100
ipdb> print(p)
100
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ndpu |