Plot a function during debugging in Python
Ok, I found a way to show the plot without breaking the debugging process.
All you need to do is to issue plt.pause(1) command, which will display the plots, and then one can continue the debugging process.
I used to work in Matlab and it is really convenient (when working with big arrays/matrices and nested functions) to visualize intermediate results during debugging using plot function. 
In Python I cannot plot anything in debug mode: a window with figure plot is never loaded (I am using Spyder IDE for coding and matplotlib.pyplot for plotting).
This is really annoying when debugging nested function and classes. 
Does anyone know a good solution? Of course, I can always output intermediate results, however it is not convenient. 
Thanks,
Mikhail