How to print p variable inside ipdb

858 Views Asked by At

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?

1

There are 1 best solutions below

3
ndpu On BEST ANSWER

You can use p p command and print function:

ipdb> p p
100
ipdb> print(p)
100