I have a program which has slow computations and I wish to debug the algorithm. Now it’s very tedious to always rerun everything and I’d rather restart from the middle of the program. Can you think of some clever way to achieve this?
The first vague idea is to define checkpoints (where I make a function call) where I save locals and large data with pickle and/or sqlite (sqlite to be able to inspect intermediate data). Later I could try to call the program telling it to restart at a specific checkpoint. However I don’t want to split all code chunks between checkpoints just for this purpose.
Has someone a clever idea how to solve this debugging issue?
A google search pointed me to CryoPID, which might do the job if you’re developing on a linux-based system. It claims to be able to suspend a process and save it to a file, and then later restart it, even on a different computer. I’ve not tested it though.