Like in matlab, is there a possiblity in Jupyter to run a function in debug mode where execution is suspended at breakpoints and in run mode the function ignores the breakpoints? In a simple example like
from IPython.core.debugger import set_trace
def debug(y):
x = 10
x = x + y
set_trace()
for i in range(10):
x = x+i
return x
debug(10)
is it possible that we call the function such that the set_trace is ignored and function is run normally?
The reason I want to have this is that in my function I have placed a lot of set traces and when I just want to run without the traces I need to comment all the set traces. Is there an easier way?