The Tracer()
still exists in ipython in a different module. You can do the following:
from IPython.core.debugger import Tracer
def my_function():
x = 5
Tracer()()
print 5
Note the additional call parentheses around Tracer
edit: For IPython 6 onwards Tracer
is deprecated so you should use set_trace()
instead:
from IPython.core.debugger import set_trace
def my_function():
x = 5
set_trace()
print 5