Reputation: 3390
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?
Upvotes: 2
Views: 1160
Reputation: 22561
You can use p p
command and print
function:
ipdb> p p
100
ipdb> print(p)
100
Upvotes: 2