I usually debug a python script 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 some arrays in an interactive graph. I use the following commands to make it 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.
P. S. I put this question here, in Computational Science, as I believe that ipdb is mostly used by people who do scientific computing.