How does the IDE stop the running uPython program on the camera? Does it send some sort of signal for which a handler could be registered? Or does it reset the camera in a way that is outside of uPython control or what?
It would be useful to be able to catch the stop.
UPDATE: I noticed the serial terminal echoing something like “Exception: IDE interrupt” … ?