0

So I import a module:

from IPython.core.debugger import Pdb

Then I initiate an object for debugging:

ipdb = Pdb()

I define a function to test debug mode:

def f(a=1):
    ipdb.set_trace()
    print(a)

After I run the function:

f()

I am in the debug mode, but if someone clear the output or switch the mode of the cell from code to markdown or NBconvert, then I lose the control of the debug mode,and to make things worse the interrupt key will not work any more(which is a very helpful weapon if you run a cell never ending), is there a way to get back the control of the debugger or at least quit the debugger mode instead of kill the whole kernel?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.