0

I have noticed that some of the ipython functionality is not available from the debugger. For example, the ? and ?? operands for variable introspection don't work:

e.g.

ipython> run my_script.py
ipython> %debug
ipdb> foo?
*** SyntaxError: invalid syntax(<stdin>, line1)

Is there a way to bring the full ipython functionality to the debugger?

1 Answer 1

4

ipython runs Python debugger pdb for debugging, so you are limited to commands offered by pdb (type h for a list) plus standard Python syntax (you may replace foo? with help(foo)).

If you want to start IPython shell at an arbitrary position in your code you can try Embedding IPython.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! but I guess that if I embed an IPython shell, I will not have access to the ipdb commands (i.e. continue, next, etc.). Am I correct? Is there a way to have the best of both worlds?
I think it is not possible in vanilla ipython, but I also found this package: pypi.python.org/pypi/ipdb (I haven't tested it)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.