I usually debug a python script with the help of the ipdb
debugger by putting the following line into the source code:
import ipdb; ipdb.set_trace()
Then when I run the script, ipdb
starts. Very often I need to plot numpy
arrays in an interactive graph using matplotlib
plotting library. I use the following commands to make interactive plotting possible inside the ipdb
:
import matplotlib.pyplot as plt
plt.ion()
My question is whether it is possible to run these two commands automatically when ipdb
starts.