Author: Patrick Li
I try the code under Jupyter notebook to set a break point. It seems that the command: import ipdb; ipdb.set_trace() does not work in the notebook. From online sources, I find out one possibility to set the break point as the follows?
%%file plot_temp.py import numpy as np import matplotlib.pyplot as plt def plot_log(): # import ipdb; ipdb.set_trace() from IPython.core.debugger import Tracer Tracer()() fig, ax = plt.subplots() x = np.logspace(1,2,10) ax.plot(x, np.log(x)) plt.show() plot_log()