configuring ipdb to change the meaning of "!"

27 Views Asked by At

When I call import ipdb; ipdb.set_trace(), I'm able to step through the program by entering just n, but if I have a variable named n that I want to inspect I have to type !n or p n ("print" n). This often messes me up. Is there a way to change the behavior such that ! is on by default (i.e., it acts like a normal IPython prompt by default) and the debugging behavior is triggered by some other key combination? Or perhaps setting it up so that I can toggle between variable inspection mode and line-stepping mode without having to always include the ! prefix?

0

There are 0 best solutions below