How to return to `ipdb` prompt from `IPython` prompt

117 Views Asked by At

I've recently started using ipdb for debugging. Colours are nicer than with the default debugger.

But I keep finding myself in an IPython prompt, and whenever I exit the IPython prompt I exit the whole program. How do I return from the IPython prompt to ipdb?

Example below:

ipdb > c
In :

At this point:

In : exit
<IPython.core.autocall.ExitAutocall object at 0x7fb204e67700>
In :

or

In : exit()
In :

or CTRL-D quits the whole program

Magic commands also not great:

In : %quit
  File "<stdin>", line 1
    %quit
    ^
SyntaxError: invalid syntax

If you suspect this is an IPython 8.10.0 bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

In : %exit
  File "<stdin>", line 1
    %exit
    ^
SyntaxError: invalid syntax

If you suspect this is an IPython 8.10.0 bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

How can I get back to my ipdb prompt?

0

There are 0 best solutions below